示例#1
0
 public Construction(BuildingType type, Settlement location, Date today)
 {
     _type = type;
     _location = location;
     _startDate = today;
     //_resourceRequirements = _type.RequirementsFor(location);
 }
示例#2
0
 internal ConstructionStep(BuildingType buildingType, XElement element)
 {
     _resourceRequirements = element.Descendants("resource")
         .Select(e => new
         {
             Resource = ResourceTypes.Types.Single(t => t.Id.Equals(e.MandatoryAttribute("type", "A construction step has a resource with no type ("+buildingType.Id+").").Value)),
             Value = new DynamicValue<Settlement>(e)
         })
         .ToDictionary(e => e.Resource, e => e.Value);
     _manpowerRequirement = new DynamicValue<Settlement>(element.MandatoryElement("manpower", "A construction step has no manpower requirement (" + buildingType.Id + ")."));
 }
示例#3
0
 public NewConstructionCommand(BuildingType buildingtype, Settlement settlement)
 {
     _buildingtype = buildingtype;
     _settlement = settlement;
 }
示例#4
0
文件: Settlement.cs 项目: ndech/Alpha
 internal void StartConstruction(BuildingType building)
 {
     Constructions.Add(new Construction(building, this, World.Calendar.Today));
 }