Beispiel #1
0
    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);
    }
Beispiel #2
0
    public void SetShipCursor(ShipType shipType, bool horizontal)
    {
        var index = (shipType.GetHashCode() - 1) * 2 + (horizontal ? 1 : 0);

        _cursorTile = cursorTiles[index];
    }