示例#1
0
 //fixed update
 public virtual void SubscribeToFixedUpdate(System.Action _fixedUpdateCallback)
 {
     if (!fixedUpdateHandler)
     {
         fixedUpdateHandler = gameObject.AddComponent <FixedUpdateHandler>();
     }
     fixedUpdateHandler.Subscribe(_fixedUpdateCallback);
 }
示例#2
0
 public virtual void SubscribeToFixedUpdate <T>(T _object, System.Action <T> _fixedUpdateCallback) where T : class
 {
     if (!fixedUpdateHandler)
     {
         fixedUpdateHandler = gameObject.AddComponent <FixedUpdateHandler>();
     }
     T1ActionCache = arg => _fixedUpdateCallback(arg as T);
     fixedUpdateHandler.Subscribe(_object, T1ActionCache);
 }