Esempio n. 1
0
        public void InitialiseRescueSsytem()
        {
            statHandler     = this.GetComponent <IStatHandler>();
            loadoutSelector = this.GetComponent <IWeaponLoadoutSelector>();
            cameraZoom      = this.GetComponentInChildren <ICameraZoom>();

            sceneController = GameManager.Instance.sceneController;
        }
Esempio n. 2
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);
        }