// Use this for initialization void Start() { myState = state.phase01; player = GameObject.FindGameObjectWithTag("Player"); Arrow = GameObject.FindGameObjectWithTag("Arrow"); shield = GameObject.FindGameObjectWithTag("Shield"); boss = GameObject.FindGameObjectWithTag("Boss2"); bossScript = boss.GetComponent <Boss02> (); AP = Arrow.GetComponent <ArrowPoint>(); numPowerPlants = 0; foreach (GameObject go in powerPlantsMain) { if (go != null) { numPowerPlants++; } } foreach (GameObject go in powerPlantsBase) { if (go != null) { numPowerPlants++; } } }
// Use this for initialization void Start() { myState = state.phase01; player = GameObject.FindGameObjectWithTag("Player"); Arrow = GameObject.FindGameObjectWithTag("Arrow"); shield = GameObject.FindGameObjectWithTag("Shield"); boss = GameObject.FindGameObjectWithTag("Boss2"); bossScript = boss.GetComponent<Boss02> (); AP = Arrow.GetComponent<ArrowPoint>(); numPowerPlants = 0; foreach (GameObject go in powerPlantsMain) { if(go != null) { numPowerPlants++; } } foreach (GameObject go in powerPlantsBase) { if(go != null) { numPowerPlants++; } } }