Beispiel #1
0
 //================================================================================================================================================
 void Update()
 {
     if (controller == null)
     {
         controller = GameObject.Find("gameController").GetComponent <gameControllerModeVs> ();
     }
     if (Time.timeScale != 0 && Input.GetButton("Fire2") && Time.time > fireSpeed.nextFire)
     {
         fire();
     }
 }
Beispiel #2
0
    //===============================================================================================================================================
    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();
        }
    }
Beispiel #3
0
 //================================================================================================================================================
 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> ();
 }