private void OnMouseDown() { if (_cellSelectorRenderer == null) { return; } var mouseWorldPosition = MUtils.Mouse.GetWorldPosition(_mainCamera); ShipCellState state = _grid.GetValueAt(mouseWorldPosition); var localPosition = _grid.SnapToWorldGridPosition(mouseWorldPosition); OnGridLocationClicked?.Invoke(localPosition, state); }
private void ControllerOnOnGridLocationClicked(Vector2 position, ShipCellState obj) { battleManager.Player.FireAtTarget(position); this.EndPlayerTurn(); }