public void SetShip(ShipType shipType, Vector3Int coordinate, bool horizontal) { var index = (shipType.GetHashCode() - 1) * 2 + (horizontal ? 1 : 0); var tile = cursorTiles[index]; fleetLayer.SetTile(coordinate, tile); }
public void SetShipCursor(ShipType shipType, bool horizontal) { var index = (shipType.GetHashCode() - 1) * 2 + (horizontal ? 1 : 0); _cursorTile = cursorTiles[index]; }