예제 #1
0
        public void BuildingDestroyed(Building b)
        {
            if (!b.Definition.Prerequisite.HasValue)
            {
                return;
            }

            var prerequisite = TechTree.Buildings[b.Definition.Prerequisite.Value];

            if (!Buildings.Any(other => other.Definition == prerequisite))
            {
                AvailableBuildings.Remove(b.Definition);
            }
        }
예제 #2
0
 public bool HaveBuilding(Location location)
 {
     return(Buildings.Any(u => u.Location.X == location.X && u.Location.Y == location.Y));
 }