Ejemplo n.º 1
0
    void Start()
    {
        GameObject controller       = GameObject.FindWithTag("GameController");
        GameObject tankSoundControl = GameObject.FindWithTag("TankSoundController");
        GameObject airStrikeControl = GameObject.FindWithTag("AirStrikeController");

        if (controller != null)
        {
            tankSoundController      = tankSoundControl.GetComponent <TankSoundController>();
            lifeController           = controller.GetComponent <LifeController>();
            consecutiveHitController = controller.GetComponent <ConsecutiveHitController>();
            airStrikeController      = airStrikeControl.GetComponent <AirStrikeController>();
        }
        else
        {
            Debug.Log("Cannot find game controller");
        }
    }
Ejemplo n.º 2
0
 void Start()
 {
     playerCanShoot      = true;
     playerCanMove       = true;
     tankSoundController = GameObject.FindWithTag("TankSoundController").GetComponent <TankSoundController>();
 }