private void InitiateShipStatHandler() { ShipData shipData = SessionData.instance.selectedShip.GetShipData(); if (shipData.FixedWeapons == null) { Debug.LogError("Caught null data"); } IStatHandler statHandler = this.GetComponent <IStatHandler>(); statHandler.InitialiseStats(SessionData.instance.selectedShip.GetShipData()); PlayerHeathComponent heathComponent = this.GetComponent <PlayerHeathComponent>(); heathComponent.InitialiseHealth(shipData.MaxHealth); PlayerShieldComponent shieldComponent = this.GetComponent <PlayerShieldComponent>(); shieldComponent.InitialiseShield(shipData.MaxShield); }
public override void InitialiseComponent() { // healthAccessors = this.GetComponent<IHealthAccessors>(); healthComponent = this.GetComponent <PlayerHeathComponent>(); }