private void OnEnable() { pooler = ObjectPooler.instance; shootCorutine = ShootMainGunsPhase1(1f); projectile = Resources.Load <GameObject>("BasicProjectile"); currentPhase = DSPhases.PHASE1; currentState = DSStates.SPAWN; mainGunsPhase1Parent = transform.GetChild(0).gameObject; mainGunsPhase2Parent = transform.GetChild(1).gameObject; coloredGunsParent = transform.GetChild(2).gameObject; coresParent = transform.GetChild(3).gameObject; foreach (Transform child in mainGunsPhase1Parent.transform) { mainGunsPhase1.Add(child.gameObject); } foreach (Transform child in mainGunsPhase2Parent.transform) { mainGunsPhase2.Add(child.gameObject); } foreach (Transform child in coloredGunsParent.transform) { coloredGuns.Add(child.gameObject); } foreach (Transform child in coresParent.transform) { cores.Add(child.gameObject); } foreach (Transform child in GameObject.Find("DualShockerPoints").transform) { movePositions.Add(child); } redGun = coloredGuns[0]; blueGun = coloredGuns[1]; }
public void ChangePhase(DSPhases newPhase) //Changes phase { currentPhase = newPhase; }