Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Update is called once per frame
- void FixedUpdate () {
- if (Player.transform.position.y > 2)
- {
- StartCoroutine(Generate());
- }
- }
- public IEnumerator Generate()
- {
- yield return new WaitForSeconds(2.0f);
- enemy.Add(Instantiate(EnemyBounce, new Vector2(this.transform.position.x, this.transform.position.y), this.transform.rotation));
- }
Advertisement
Add Comment
Please, Sign In to add comment