public void Play(Coord coord)
        {
            if (_factionManager.TryGetStructureAtCoord(coord, out IStructure structure))
            {
                _factionManager.GetOwnerOfStructure(structure)
                .StructureManager.RemoveStructure(structure);
            }

            ClearPreview();
        }
Example #2
0
 public void AddStructure(StructureDefinition.StructureType type, Coord coord)
 {
     if (type != StructureDefinition.StructureType.Empty)
     {
         if (_factionManager.TryGetStructureAtCoord(coord, out IStructure structure))
         {
             _factionManager.GetOwnerOfStructure(structure)
             .StructureManager.RemoveStructure(structure);
         }
         _structures.Add(_structureFactory.GetStructure(_structureDefinitionManager.GetDefinitionForType(type), coord));
     }
 }