public void InitialiseRescueSsytem() { statHandler = this.GetComponent <IStatHandler>(); loadoutSelector = this.GetComponent <IWeaponLoadoutSelector>(); cameraZoom = this.GetComponentInChildren <ICameraZoom>(); sceneController = GameManager.Instance.sceneController; }
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); }