private void Start()
 {
     Canvas        = GameObject.FindGameObjectWithTag("Canvas");
     LunchLass     = GameObject.FindGameObjectWithTag("Player");
     healBoxAmount = Canvas.GetComponentInChildren <HealBoxAmount>();
     health        = LunchLass.GetComponentInChildren <BoHealthController>();
     healthBar     = LunchLass.GetComponentInChildren <BoHealthBar>();
 }
示例#2
0
 private void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     health = player.GetComponent <BoHealthController>();
 }