public void StartStopWatch(IUsingTimer timerUser)
        {
            if (stopWatch == null)
            {
                Initailize();
            }

            StartCoroutine(stopWatch.Begin(timerUser));
        }
        public void StartTimer(float timeLength, IUsingTimer timerUser)
        {
            if (timers == null)
            {
                Initailize();
            }

            StartCoroutine(timers.Timer(timeLength, timerUser));
        }
Beispiel #3
0
        public IEnumerator Begin(IUsingTimer timerUser)
        {
            _isGoing = true;

            while (_isGoing)
            {
                time += Time.deltaTime;
                yield return(null);
            }
        }
Beispiel #4
0
        public IEnumerator Timer(float timeLength, IUsingTimer timerUser)
        {
            float time = 0f;

            //Debug.Log("Timer Started");

            while (time < timeLength)
            {
                time += Time.deltaTime;
                yield return(null);
            }
            timerUser.TimerFinished();
        }