2016年8月18日
摘要: 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 阅读(124) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using System.Collections.Generic; public class MessageCenter : Singleton<MessageCenter>{ private Dictionary 阅读全文
posted @ 2016-08-18 19:58 tianjiuwan 阅读(249) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using System.Collections.Generic;using System;/* 消息体 直接遍历 key访问 message[key] send() remove() add() 构造函数参数=》 阅读全文
posted @ 2016-08-18 19:57 tianjiuwan 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(220) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections; public abstract class BasePanel : MonoBehaviour{ //panel State protected E_PanelState _panelState; public 阅读全文
posted @ 2016-08-18 19:55 tianjiuwan 阅读(209) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections; public abstract class BaseUI : MonoBehaviour{ //缓存 gameobject 和 transform private GameObject _cacheGameObj 阅读全文
posted @ 2016-08-18 19:53 tianjiuwan 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(1583) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(760) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 控制台输出(并换行): cout<<输出内容<<endl printf(输出内容) new 一个类:(类的构造函数可以重载) MyClass myClass(构造函数参数列表);(系统自动释放内存) 方法调用:对象.方法(); 成员调用:对象.成员; MyClass* myClass = new M 阅读全文
posted @ 2016-08-18 17:08 tianjiuwan 阅读(139) 评论(0) 推荐(0) 编辑