Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. IEnumerator EncounterAdd()
  2. {  
  3.  
  4.     yield return new WaitForSeconds(1);
  5.  
  6.         MoveX = Input.GetAxis("Horizontal");
  7.         if (MoveX != 0)
  8.             Encounter = Encounter + (Random.Range(1, 5));
  9.         else
  10.             StartCoroutine(EncounterAdd());
  11.         if (Encounter >= 100)
  12.             Application.LoadLevel(1);
  13.         else StartCoroutine(EncounterAdd());
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement