void Start() { secTimer = gameObject.AddComponent<zzTimer>(); secTimer.setInterval(1f); secTimer.setImpFunction(second); secTimer.enabled = false; }
void Awake() { base.Awake(); timer.setInterval(actionLength); foreach (var lTimeAction in timeAction) { lTimeAction.timer = gameObject.AddComponent<zzTimer>(); } actionAnimationEndTimer = gameObject.AddComponent<zzTimer>(); actionAnimationEndTimer.setInterval(actionAnimationLength); actionAnimationEndTimer.setImpFunction(actionAnimationEnd); actionAnimationEndTimer.enabled = false; }