Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma strict
  2.  
  3. public class New extends MonoBehaviour
  4. {
  5.     public static var timer : float = 0;
  6.     public static var nb: int = 0;
  7.  
  8.     function Update()
  9.     {
  10.         timer += Time.deltaTime;
  11.         Debug.Log("Update");
  12.         if (nb < 5)
  13.         {
  14.             Debug.Log("nb balle");
  15.             if (timer > 3)
  16.             {
  17.                 Instantiate(Resources.Load("Balls"), Vector2(nb*0.5,nb*0.5 ), Quaternion.identity);
  18.                 Debug.Log("Balle!");
  19.                 nb++;
  20.                 timer = 0;
  21.             }
  22.         }
  23.     }
  24. }
  25.  
  26. function Start()
  27. {
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement