public override void InitialiseHealth(float maxHealth) { healthAccessors = this.GetComponent <IHealthAccessors>(); GameObject playerHud = GameObject.FindGameObjectWithTag("HUD"); IHudAccessors vitalityAccessors = playerHud.GetComponent <IHudAccessors>(); healthBar = vitalityAccessors.GetHealthBar(); healthBar.InitialiseBar(maxHealth); }
public override void InitialiseHealth(float maxHealth) { healthAccessors = this.GetComponent <IHealthAccessors>(); stateManager = this.GetComponent <IStateManager>(); }