void Start() { p1 = player1.GetComponent <PlayerData>(); p2 = player2.GetComponent <PlayerData>(); p1_anim = player1.GetComponentInChildren <Animator>(); p2_anim = player2.GetComponentInChildren <Animator>(); p1_AudioSource = player1.GetComponentInChildren <AudioSource>(); p2_AudioSource = player1.GetComponentInChildren <AudioSource>(); statusBar = gameObject.GetComponent <UIBarScript>(); statusBar.HealthChange(0, p1.health); statusBar.HealthChange(1, p2.health); }
// Use this for initialization void Start() { m_UIBarScript = GetComponent <UIBarScript> (); }
void Start() { coinUIBarScript = this.gameObject.GetComponent<UIBarScript> (); }