예제 #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>();
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     char_        = GameObject.FindGameObjectWithTag("Player").gameObject;
     stats_global = GameObject.FindGameObjectWithTag("Stats").transform.GetComponent <Stats_UI> ();
     stats_char   = GameObject.FindGameObjectWithTag("Player").transform.GetComponent <Char_stats>();
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     stats_char = GameObject.FindGameObjectWithTag("Player").transform.GetComponent <Char_stats>();
 }