Ejemplo n.º 1
0
 /*
  * Disallow anything to be done until initialized.
  */
 public void Init(StartOfAction _startFn, EndOfAction _endFn, float newTime, float newCooldown, float delay)
 {
     ready = true;
     SetFunctions(_startFn, _endFn);
     SetTimes(newTime, newCooldown);
     SetDelay(delay);
 }
Ejemplo n.º 2
0
 // Baseline initializtion.
 private void Awake()
 {
     ready       = false;
     inAction    = false;
     startFn     = null;
     endFn       = null;
     currentTime = currentCooldown = delay = maxTime = maxCooldown = 0f;
 }
Ejemplo n.º 3
0
 public void SetFunctions(StartOfAction _startFn, EndOfAction _endFn)
 {
     if (!ready)
     {
         Debug.LogWarning("Changing functions for " + this + " when Timer is not ready, or unitialized");
         return;
     }
     startFn = _startFn;
     endFn   = _endFn;
 }