Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- public class New extends MonoBehaviour
- {
- public static var timer : float = 0;
- public static var nb: int = 0;
- function Update()
- {
- timer += Time.deltaTime;
- Debug.Log("Update");
- if (nb < 5)
- {
- Debug.Log("nb balle");
- if (timer > 3)
- {
- Instantiate(Resources.Load("Balls"), Vector2(nb*0.5,nb*0.5 ), Quaternion.identity);
- Debug.Log("Balle!");
- nb++;
- timer = 0;
- }
- }
- }
- }
- function Start()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement