Exemple #1
0
    // Use this for initialization
    void Start()
    {
        quit  = this.transform.root.Find("Quit").gameObject;
        retry = this.transform.root.Find("Begin").gameObject;

        quit.SetActive(false);
        retry.SetActive(false);

        tutorial = this.transform.root.Find("Tutorial").gameObject;
        tutorial.SetActive(true);

        time_gameobject  = this.transform.Find("Time").gameObject;
        life_gameobject  = this.transform.Find("Life").gameObject;
        ammo_gameobject  = this.transform.Find("Ammo").gameObject;
        score_gameobject = this.transform.Find("Score").gameObject;
        best_gameobject  = this.transform.Find("Best").gameObject;

        life_ = GameObject.FindGameObjectWithTag("Player").transform.GetComponent <Char_stats> ();
        ammo_ = GameObject.FindGameObjectWithTag("Player").transform.Find("Weapon").GetComponent <Weapon_shoot> ();

        life_text  = life_gameobject.GetComponent <Text> ();
        ammo_text  = ammo_gameobject.GetComponent <Text> ();
        score_text = score_gameobject.GetComponent <Text>();
        best_text  = best_gameobject.GetComponent <Text>();
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     stats_weapon = GameObject.FindGameObjectWithTag("Player").transform.Find("Weapon").transform.GetComponent <Weapon_shoot>();
 }