void Start()
 {
     healthBar     = this.gameObject.transform.GetChild(1).GetChild(0).GetChild(0).gameObject;
     healthFill    = healthBar.GetComponent <Image>();
     healthCounter = GetComponent <StatusHealth>();
     maxHealth     = healthCounter.maxHealth;
 }
示例#2
0
 void Start()
 {
     cam           = GameObject.Find("Main Camera").GetComponent <Camera>();;
     healthText    = GameObject.Find("PlayerHealthText");
     healthBar     = GameObject.Find("ChampionBar");
     setText       = healthText.GetComponent <Text>();
     healthFill    = healthBar.GetComponent <Image>();
     healthCounter = GetComponent <StatusHealth>();
     maxHealth     = healthCounter.maxHealth;
 }