//================================================================================================================================================ void Update() { if (controller == null) { controller = GameObject.Find("gameController").GetComponent <gameControllerModeVs> (); } if (Time.timeScale != 0 && Input.GetButton("Fire2") && Time.time > fireSpeed.nextFire) { fire(); } }
//=============================================================================================================================================== void Update() { if (flag == true && Time.time > time2 + 2) { Application.LoadLevel("Vs"); } if (controller == null) //we need the object controller to find the object in the game that hold the class that we want no access in. { controller = GameObject.Find("gameController").GetComponent <gameControllerModeVs> (); } if (Time.timeScale != 0 && Input.GetButton("Fire1") && Time.time > fireSpeed.nextFire) //to fire { fire(); } }
//================================================================================================================================================ void Start() { //we need the object controller to find the object in the game that hold the class that we want no access in. controller = GameObject.Find("gameController").GetComponent <gameControllerModeVs> (); }