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)); }
public IEnumerator Begin(IUsingTimer timerUser) { _isGoing = true; while (_isGoing) { time += Time.deltaTime; yield return(null); } }
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(); }