Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     boxer                 = this.gameObject;
     rb                    = GetComponent <Rigidbody> ();
     resetMatch            = GameObject.Find("SceneControl").GetComponent("ResetMatch") as ResetMatch;
     health                = 100;
     startHealth           = health;
     healthLoss            = 0;
     healthBar             = gameObject.transform.FindChild("Cube/HealthBarCanvas").gameObject;
     countdownTimerGameObj = gameObject.transform.FindChild("Cube/CountdownTimer").gameObject;
     countdownScript       = countdownTimerGameObj.GetComponent <CountdownTimer>();
     healthBar.SetActive(true);
     countdownTimerGameObj.SetActive(false);
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        ResetMatch reset = GameObject.Find("SceneControl").GetComponent("ResetMatch") as ResetMatch;

        gameObject.GetComponent <TextMesh> ().text = reset.winner + " wins";
    }