摘要:
using System.Collections; using System.Collections.Generic; using UnityEngine; //T为脚本名,可以直接把已经写好的脚本变为单例来用 public class SingleObjectwhere T:class,new() { private static T instance; public st... 阅读全文
摘要:
委托事件声明写在被观察者类(脚本)上 事件调用写在被观察者类(脚本)的被观察行为方法内部 再在观察者类(脚本)中的Update方法中写(因为观察是每帧判断执行的)调用被观察者的事件+=观察者观察到之后触发的方法; 阅读全文
摘要:
作者ChevyRay ,2013年9月28日,snaker7译 原文地址:http://unitypatterns.com/introduction-to-coroutines/ 在Unity中,协程(Coroutines)的形式是我最喜欢的功能之一,几乎在所有的项目中,我都会使用它来控制运动,序列 阅读全文