Exemplo n.º 1
0
 private void Awake()
 {
     if (_shipMovement == null)
     {
         _shipMovement = GetComponent <IShipMovement>();
     }
     if (_playerWeapon == null)
     {
         _playerWeapon = GetComponentInChildren <IWeapon>();
     }
     if (_hyperSpace == null)
     {
         _hyperSpace = GetComponent <IShipHyperSpace>();
     }
     if (_entityHealthComponent == null)
     {
         _entityHealthComponent = GetComponent <EntityHealthComponent>();
     }
 }
Exemplo n.º 2
0
 protected override void HandlePlayerSpawned(PlayerShipComponent playerShipController)
 {
     base.HandlePlayerSpawned(playerShipController);
     _shipMovement = playerShipController.ShipMovement;
 }
Exemplo n.º 3
0
 protected override bool HandlePlayerDespawned(PlayerShipComponent playerShipController)
 {
     base.HandlePlayerDespawned(playerShipController);
     _shipMovement = null;
     return(true);
 }