private IEnumerator ClearAllCoresAsyncFunction(bool leaveASound) { CoreTimer timer = GetComponent <CoreTimer>(); yield return(null); CoreTween tween = GetComponent <CoreTween>(); yield return(null); if (timer != null) { Destroy(timer); yield return(null); } if (tween != null) { Destroy(tween); yield return(null); } if (onAllCoresCleared != null) { onAllCoresCleared(); } }
public static void ClearAllCores(bool leaveASound) { if (_instance == null) { return; } CoreTimer timer = _instance.GetComponent <CoreTimer>(); CoreTween tween = _instance.GetComponent <CoreTween>(); if (timer != null) { Destroy(timer); } if (tween != null) { Destroy(tween); } }
void Awake() { _lastFrameTime = Time.realtimeSinceStartup; _aTimerCore = this; }