Exemplo n.º 1
0
    //==============================================================================================================================================================
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindGameObjectWithTag("gameControllerEnemy");

        control = gameControllerObject.GetComponent <gameControllerModeEnemies> ();

        //respawn ();//spawn enemies
    }
Exemplo n.º 2
0
    //===========================================================================================================================================
    void Update()
    {
        float probabilty = Time.deltaTime * shotspersecond;

        if (Random.value < probabilty)
        {
            fire();
        }                               // prevent the el bullets of enemy become st.line && create time between each bullet
        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 <gameControllerModeEnemies> ();
        }
    }
Exemplo n.º 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 <gameControllerModeEnemies> ();
 }
Exemplo n.º 4
0
    //==========================================================================================================================
    void Start()
    {    //make an object to hold the class from other object in the game to can access it.
        GameObject gameControllerObject = GameObject.FindGameObjectWithTag("gameControllerEnemy");

        control = gameControllerObject.GetComponent <gameControllerModeEnemies> ();
    }