Created
July 24, 2019 01:36
-
-
Save jadepark-dev/78177aa5d34c4b2efb5420137207a55f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(AppManager))] | |
public class UserTimer : MonoBehaviour | |
{ | |
#region Timer Coroutines | |
public IEnumerator _NoshowTimer(int timeLimit) | |
{ | |
for (int i = 0; i < timeLimit; i++) | |
{ | |
Debug.Log("Noshow Timer : " + (timeLimit - i)); | |
yield return new WaitForSeconds(timeLimit / timeLimit); | |
} | |
this.gameObject.GetComponent<AppManager>().ToIdleScene(); | |
this.gameObject.GetComponent<AppManager>().noshowTimerStarted = false; | |
} | |
public IEnumerator _InteractionTimer(int timeLimit) | |
{ | |
for (int i = 0; i < timeLimit; i++) | |
{ | |
Debug.Log("Interaction Timer : " + (timeLimit - i)); | |
yield return new WaitForSeconds(timeLimit / timeLimit); | |
} | |
this.gameObject.GetComponent<AppManager>().ToIdleScene(); | |
} | |
public IEnumerator _LostTrackingTimer(int timeLimit) | |
{ | |
for (int i = 0; i < timeLimit; i++) | |
{ | |
Debug.Log("Lost Tracking : " + (timeLimit - i)); | |
yield return new WaitForSeconds(timeLimit / timeLimit); | |
} | |
this.gameObject.GetComponent<AppManager>().ToIdleScene(); | |
} | |
#endregion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment