Пример #1
0
        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();
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 void Awake()
 {
     _lastFrameTime = Time.realtimeSinceStartup;
     _aTimerCore    = this;
 }