Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public override void InitialiseComponent()
 {
     // healthAccessors = this.GetComponent<IHealthAccessors>();
     healthComponent = this.GetComponent <PlayerHeathComponent>();
 }