Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     totemObject      = transform.parent.gameObject.transform.parent.gameObject;
     totem            = totemObject.GetComponent <Totem> ();
     maxHealth        = totem.getMaxHealth();
     currentHealth    = totem.getCurrentHealth();
     currentHealthBar = transform.GetChild(0).gameObject;
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     this.currentHealth = totem.getCurrentHealth();
     UpdateHealthBar();
 }