public void SetSelectedShip(CombatShipController shipController) { if (shipController == _focusedShip) { return; } _focusedShip = shipController; OnFocusedShipChanged?.Invoke(shipController); }
private void OnSelectionChanged(object sender, Entity oldEntity, Entity newEntity) { if (_focusedShip != null && newEntity == null) { _focusedShip = null; OnFocusedShipChanged?.Invoke(null); return; } if (_playerShips.Contains(newEntity as CombatShipController)) { _focusedShip = newEntity as CombatShipController; OnFocusedShipChanged?.Invoke(_focusedShip); return; } }