Beispiel #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);
 }
Beispiel #2
0
 // Baseline initializtion.
 private void Awake()
 {
     ready       = false;
     inAction    = false;
     startFn     = null;
     endFn       = null;
     currentTime = currentCooldown = delay = maxTime = maxCooldown = 0f;
 }
Beispiel #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;
 }
Beispiel #4
0
 /// <summary>
 /// Method overriding ToString()
 /// </summary>
 /// <returns>String</returns>
 public override string ToString()
 {
     return("Банковская карта:\n\t\t" + base.ToString() + "\tДата окончания: " + EndOfAction.ToShortDateString() + "\tБанк: " + BankName + "\tНомер карты: " + CardNumber + "\tТип карты: " + CardType + "\tCVC-код: " + CVC.ToString());
 }