public static void build(Region region, int x, int y, Building building)
        {
            switch (building.getBuildingType())
            {
                case BuildingType.BANK:
                    buildByArray(region, x, y, building, bankStruct);
                    break;

                case BuildingType.INN:
                    buildByArray(region, x, y, building, innStruct);
                    building.setLit(false);
                    break;

                case BuildingType.HOUSE:
                    buildByArray(region, x, y, building, houseStruct);
                    break;

                case BuildingType.FOOD_STORE:
                    buildByArray(region, x, y, building, foodStoreStruct);
                    break;

                case BuildingType.TOOL_STORE:
                    buildByArray(region, x, y, building, toolStoreStruct);
                    break;
            }
        }
Example #2
0
 public object CopyObject()
 {
     Building newBuild = new Building();
     newBuild.setName(this.getName());
     newBuild.setX(this.x);
     newBuild.setY(this.y);
     newBuild.setWidth(this.width);
     newBuild.setHeight(this.height);
     newBuild.setBuildingType(this.buildingType);
     newBuild.setDoor(this.door.x, this.door.y);
     newBuild.setLit(this.isLit());
     newBuild.setRoofType(this.roofType);
     return newBuild;
 }