/* * 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); }
// Baseline initializtion. private void Awake() { ready = false; inAction = false; startFn = null; endFn = null; currentTime = currentCooldown = delay = maxTime = maxCooldown = 0f; }
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; }
/// <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()); }