08 2016 档案
Unity Draw Call 初研究
摘要:前言:百度了几个博客讲解unity draw call的文章,不明觉厉,我应该先自己去unity中试试先,不然看着一脸懵B,let‘s go! DC:Batches Draw Call,每一次dc都会调用图形API绘制图像,每次的调用都会消耗比较多性能,减少DC,优化项目 一:光照因素(光照可能增加 阅读全文
posted @ 2016-08-30 20:31 tianjiuwan 阅读(351) 评论(0) 推荐(0)
判断点是否在一个任意多边形中
摘要:using UnityEngine;using System.Collections.Generic; public class JudgePoint : MonoBehaviour{ //多边形A 所有顶点 private float[,] dingdian = new float[4, 3] { 阅读全文
posted @ 2016-08-26 10:50 tianjiuwan 阅读(1490) 评论(0) 推荐(0)
A*寻路-2(忘了哪个是最终版的)
摘要:using UnityEngine;using System.Collections.Generic; public class TestAStar : MonoBehaviour{ //以点为方格 //A点 [1,2] B点[6,7] private List<float[,]> parentPo 阅读全文
posted @ 2016-08-26 10:48 tianjiuwan 阅读(190) 评论(0) 推荐(0)
[TWLFramework] 全局委托 全局枚举
摘要:using UnityEngine;using System.Collections; #region 全局委托 public delegate void MessageEvent(Message message); #endregion #region 全局枚举//panel Typepublic 阅读全文
posted @ 2016-08-19 09:31 tianjiuwan 阅读(255) 评论(0) 推荐(0)
[TWLFramework] Singleton
摘要:using UnityEngine;using System.Collections; //单例模式 public class Singleton<T> where T : class, new(){ protected static T _instance = null; public stati 阅读全文
posted @ 2016-08-18 19:59 tianjiuwan 阅读(134) 评论(0) 推荐(0)
[TWLFramework] MessageCenter
摘要:using UnityEngine;using System.Collections;using System.Collections.Generic; public class MessageCenter : Singleton<MessageCenter>{ private Dictionary 阅读全文
posted @ 2016-08-18 19:58 tianjiuwan 阅读(255) 评论(0) 推荐(0)
[TWLFramework] Message
摘要:using UnityEngine;using System.Collections;using System.Collections.Generic;using System;/* 消息体 直接遍历 key访问 message[key] send() remove() add() 构造函数参数=》 阅读全文
posted @ 2016-08-18 19:57 tianjiuwan 阅读(235) 评论(0) 推荐(0)
[TWLFramework] UIManager
摘要:using UnityEngine;using System.Collections;using System.Collections.Generic; public class UIManager : Singleton<UIManager>{ //UI gameobjects public Di 阅读全文
posted @ 2016-08-18 19:56 tianjiuwan 阅读(235) 评论(0) 推荐(0)
[TWLFramework] BasePanel
摘要:using UnityEngine;using System.Collections; public abstract class BasePanel : MonoBehaviour{ //panel State protected E_PanelState _panelState; public 阅读全文
posted @ 2016-08-18 19:55 tianjiuwan 阅读(223) 评论(0) 推荐(0)
[TWLFramework] BaseUI
摘要:using UnityEngine;using System.Collections; public abstract class BaseUI : MonoBehaviour{ //缓存 gameobject 和 transform private GameObject _cacheGameObj 阅读全文
posted @ 2016-08-18 19:53 tianjiuwan 阅读(277) 评论(0) 推荐(0)
裁剪UI Image 矩形四角圆形 Shader
摘要:Shader "Custom/CullImage" {Properties{[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}_Color("Tint", Color) = (1,1,1,1)_StencilComp("Sten 阅读全文
posted @ 2016-08-18 19:50 tianjiuwan 阅读(1605) 评论(0) 推荐(0)
GameObject material 动画序列帧shader
摘要:Shader "Custom/UVanim" {Properties{_Color("Color", Color) = (1,1,1,1)_MainTex("Albedo (RGB)", 2D) = "white" {}_Glossiness("Smoothness", Range(0,1)) = 阅读全文
posted @ 2016-08-18 19:49 tianjiuwan 阅读(196) 评论(0) 推荐(0)
UI序列帧播放Shader
摘要:1:UI动画序列帧shader 分割线 Shader "Custom/ImageAnim" {Properties{[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}_Color("Tint", Color) = (1,1,1, 阅读全文
posted @ 2016-08-18 19:48 tianjiuwan 阅读(772) 评论(0) 推荐(0)
A*寻路
摘要:using UnityEngine;using System.Collections.Generic;public class TestXunLu : MonoBehaviour{//以点为方格//A点(起点) [1,2] B点(终点)[6,7]private List<float[,]> pare 阅读全文
posted @ 2016-08-18 19:46 tianjiuwan 阅读(183) 评论(0) 推荐(0)
【C++初体验】8-18-2016_001
摘要:控制台输出(并换行): cout<<输出内容<<endl printf(输出内容) new 一个类:(类的构造函数可以重载) MyClass myClass(构造函数参数列表);(系统自动释放内存) 方法调用:对象.方法(); 成员调用:对象.成员; MyClass* myClass = new M 阅读全文
posted @ 2016-08-18 17:08 tianjiuwan 阅读(145) 评论(0) 推荐(0)