Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool start;
- float nonTimedTime;
- public float actualTime;
- public Respawner respawnRef;
- void Update()
- {
- if (start)
- actualTime = Time.time - nonTimedTime;
- else
- nonTimedTime = Time.time;
- if (actualTime > 120)
- respawnRef.GameOver();
- StartCoroutine(EndGame());
- }
- IEnumerator EndGame()
- {
- yield return new WaitForSeconds(10f);
- // Application.LoadLevel(Application.loadedLevel);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement