// Use this for initialization void Start() { updateTime = Time.time; uic = UIobject.GetComponent<UIController>(); for (int i = 0; i < 5; i++) { //if(launchers[i].name != "launcher1") //launchers[i].SetActive(true); lScript = launchers[i].GetComponent<MissileLaucher> (); lScript.GetReady(); // } //remove loading slide for (int i = 0; i < 5; i++) { if(launchers[i].name == "launcher1") { //launchers[i].SetActive(true); lScript = launchers[i].GetComponent<MissileLaucher> (); lScript.ready = true; } } startTime = Time.time; }
void IncreaseSpeedForAll(int speedup) { for (int j = 0; j <launchers.Length; j++) { lScript = launchers [j].GetComponent<MissileLaucher>(); lScript.velocity += speedup; } }
void getActiveMissileCount() { int count = 0; for(int j = 0;j <launchers.Length; j++) { lScript = launchers[j].GetComponent<MissileLaucher> (); count += lScript.MissileCount(); } uic.TimeText.text = "missiles: " + count.ToString(); }