// Use this for initialization void Start () { if (Instance == null) Instance = this; else Destroy(gameObject); for (int i = 0; i < MAX_BULLETS; i++) { ShmupBullet b = ((GameObject)Instantiate(BulletPrefab)).GetComponent<ShmupBullet>(); b.transform.parent = transform; b.gameObject.SetActive(false); Bullets.Add(b); } }
// Use this for initialization void Start() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } for (int i = 0; i < MAX_BULLETS; i++) { ShmupBullet b = ((GameObject)Instantiate(BulletPrefab)).GetComponent <ShmupBullet>(); b.transform.parent = transform; b.gameObject.SetActive(false); Bullets.Add(b); } }