void Start()
    {
        GameObject controller = GameObject.FindWithTag("GameController");

        if (controller != null)
        {
            consecutiveHitController = controller.GetComponent <ConsecutiveHitController>();
        }
        else
        {
            Debug.Log("Cannot find game controller");
        }
    }
    void Start()
    {
        GameObject controller = GameObject.FindWithTag("GameController");

        if (controller != null)
        {
            consecutiveHitController = controller.GetComponent <ConsecutiveHitController>();
        }
        else
        {
            Debug.Log("Cannot find game controller");
        }
        airStrikeText = this.GetComponent <GUIText>();
        HideAirStrikeText();
        airStrikeText.text = "PRESS 'E' FOR AIR STRIKE";
    }
Beispiel #3
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");
        }
    }