本文整理汇总了C#中BuildingType类的典型用法代码示例。如果您正苦于以下问题:C#BuildingType类的具体用法?C#BuildingType怎么用?C#BuildingType使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:Building
publicBuilding(BuildingTypebuildingType,Islandisland)
{
this.BuildingType=buildingType;
this.ResourceManager=newResourceManager();
this.BuildState=0;
this.Island=island;
this.ConstructionResourceNeeded=newList
>();
this.Name=String.Empty;
switch(buildingType)
{
caseBuildingType.Scierie:
this.ConstructionResourceNeeded.Add(newTuple(ResourceType.Or,3));
this.ResourceManager.addResource(ResourceType.Bois,"bois",0,4);
//ressourceNeeded="or";
//consumptionCost=3;
//ressourceProduced="bois";
//productionCost=4;
this.ConstructionTime=5;
break;
caseBuildingType.Mine:
this.ResourceManager.addResource(ResourceType.Or,"Or",0,1);
this.ConstructionTime=0;
break;
caseBuildingType.Usine:
this.ConstructionTime=0;
break;
caseBuildingType.Ferme:
this.ConstructionTime=0;
break;
}
//this.build();
}
原文链接:http://www.jxszl.com/biancheng/C/556601.html