Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Spawn : MonoBehaviour {
- public GameObject[] enemyPool;
- public bool active = true;
- public void generateEnemy()
- {
- if (active)
- {
- GameObject go = Instantiate(enemyPool[Random.Range(0, enemyPool.Length)], transform.position, Quaternion.identity) as GameObject;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement