Guest User

Untitled

a guest
Sep 18th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1.     // Update is called once per frame
  2.     void FixedUpdate () {
  3.         if (Player.transform.position.y > 2)
  4.         {
  5.             StartCoroutine(Generate());
  6.         }
  7.     }
  8.  
  9.     public IEnumerator Generate()
  10.     {
  11.         yield return new WaitForSeconds(2.0f);
  12.         enemy.Add(Instantiate(EnemyBounce, new Vector2(this.transform.position.x, this.transform.position.y), this.transform.rotation));
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment