Пример #1
0
 public Placement(PlaceableType placeableType, int cellX, int cellY, int teamIndex = 0)
 {
     type = placeableType;
     x    = cellX;
     y    = cellY;
     team = teamIndex;
 }
Пример #2
0
    public void SetPlacement(PlaceableType type, int x, int y, int team = 0)
    {
        Placement currentPlacement = GetPlacement(x, y);

        if (currentPlacement != null)
        {
            currentPlacement.type = type;
            currentPlacement.team = team;
        }
        else
        {
            m_placements.Add(new Placement(type, x, y, team));
        }
    }