摘要: 1 using UnityEngine; 2 using System.Collections; 3 using System.Collections.Generic; 4 // 5 //Enum defining all possible game events 6 //More events s 阅读全文
posted @ 2020-03-15 22:37 漏船载酒泛中流 阅读(277) 评论(0) 推荐(0)
摘要: 1 using UnityEngine; 2 using System.Collections; 3 // 4 //Sample Game Manager class - Singleton Object 5 public class GameManager : MonoBehaviour 6 { 阅读全文
posted @ 2020-03-15 22:20 漏船载酒泛中流 阅读(1755) 评论(0) 推荐(0)
摘要: 1 //Class to fade from camera 0 to 1, and back from 1 to 0 2 //This class assumes there are only two scene cameras 3 // 4 using UnityEngine; 5 using S 阅读全文
posted @ 2020-03-15 22:17 漏船载酒泛中流 阅读(462) 评论(0) 推荐(0)
摘要: 正则表达式 1 public class RGX : MonoBehaviour 2 { 3 //Regular Expression Search Pattern 4 string search = "[dw]ay"; 5 6 //Larger string to search 7 string 阅读全文
posted @ 2020-03-15 21:57 漏船载酒泛中流 阅读(179) 评论(0) 推荐(0)
摘要: 概述 Unity提供的消息推送机制可以非常方便我们的脚本开发,它实现的是一种伪监听者模式,利用的是反射机制。最好用c#委托来实现消息传递。不要用本文的sendmessage,其频繁使用反射影响性能而且不利于以后代码维护。 常用函数 关于消息推送,常用的函数有三个:”SendMessage“、”Sen 阅读全文
posted @ 2020-03-15 21:27 漏船载酒泛中流 阅读(627) 评论(0) 推荐(0)
摘要: 1.装箱和拆箱是一个抽象的概念,.NET中,NET的所有类型都是由基类System.Object继承过来的,数据类型划分为值类型和引用(不等同于C++的指针)类型,与此对应,内存分配被分成了两种方式,一为栈,二为堆,注意:是托管堆。值类型只会在栈中分配,引用类型分配内存与托管堆。托管堆对应于垃圾回收 阅读全文
posted @ 2020-03-15 20:30 漏船载酒泛中流 阅读(170) 评论(0) 推荐(0)