Exemplo n.º 1
0
 void OnDestroy()
 {
     if (TimeBetweenUpdates > 0)
     {
         CyclicUpdateRegistry.RemoveUpdateMethod(MyUpdate, this);
     }
     if (TimeBetweenLateUpdates > 0)
     {
         CyclicLateUpdateRegistry.RemoveUpdateMethod(MyLateUpdate, this);
     }
 }
Exemplo n.º 2
0
 void Start()
 {
     if (TimeBetweenUpdates > 0)
     {
         CyclicUpdateRegistry.RegisterUpdateMethod(MyUpdate, this, TimeBetweenUpdates);
     }
     ;
     if (TimeBetweenLateUpdates > 0)
     {
         CyclicLateUpdateRegistry.RegisterUpdateMethod(MyLateUpdate, this, TimeBetweenLateUpdates);
     }
     ;
 }