摘要: using UnityEngine; public class CameraRotateFollowFinger : MonoBehaviour { bool isRotating = false; public GameObject player; /// /// 旋转速度 /// public float speed = 100; ... 阅读全文
posted @ 2018-01-18 17:34 cz夏花 阅读(129) 评论(0) 推荐(0) 编辑
摘要: using UnityEditor; using UnityEngine; public class BuildAssetBundle { [MenuItem("AssetBundle/BuildSingle")] static void BuildSigle() { BuildPipeline.BuildAssetBundles(Application... 阅读全文
posted @ 2018-01-18 17:27 cz夏花 阅读(128) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class InputNavigator : MonoBehaviour, ISelectHandler, IDeselectHandler { EventSystem _system; pr... 阅读全文
posted @ 2018-01-17 21:08 cz夏花 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 基类方法必须定义为 virtual。 如果派生类中的方法前面没有 new 或 override 关键字,则编译器将发出警告,该方法将如同存在 new 关键字一样执行操作。 如果派生类中的方法前面带有 new 关键字,则该方法被定义为独立于基类中的方法。 如果派生类中的方法前面带有 override  阅读全文
posted @ 2017-12-16 19:12 cz夏花 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 扩展方法可以在不修改原有类的代码前提下,给类“增加”一个方法。扩展方法虽然属于静态方法,但调用的语法却和对象调用类似。直接用一个例子来演示扩展方法。 首先,先准备一个类,这个类里面没有我们要扩展的方法: 然后,再准备以后静态类,静态类里面有一个静态方法,对我们要扩展的类增加扩展方法: SayHell 阅读全文
posted @ 2017-12-16 12:59 cz夏花 阅读(254) 评论(0) 推荐(0) 编辑