예제 #1
0
        // Constructor

        public Building(
            BuildingLocationType buildingLocation,
            BuildingType buildingType,
            int roomCount,
            int floors,
            Coordinates coordinate)
        {
            this.BuildingID       = buildingIdGenerator++;
            this.BuildingLocation = buildingLocation;
            this.BuildingType     = buildingType;
            this.RoomCount        = roomCount;
            this.Floors           = floors;
            this.Coordinate       = coordinate;
        }
예제 #2
0
 public BuildingType(int id, string name, GameObject prefab, BuildingCategory buildingCategory, float energyConsumption, List <ResourcesManager.ResourceAmount> cost, BuildingLocationType buildingLocationType, string imageName, int maxTier, int unlockedAtLevelNb, string description, List <ResourcesManager.UpgradeCost> upgradeCosts, List <SpecializedUpgrade> specializedUpgrades, bool hasRange, bool producesEnergy, List <Building.BuildingStat> specificStats, bool isUnique)
 {
     this.id                   = id;
     this.name                 = name;
     this.prefab               = prefab;
     this.energyConsumption    = energyConsumption;
     this.resourceCosts        = cost;
     this.buildingLocationType = buildingLocationType;
     this.buildingImage        = Resources.Load <Sprite>("Images/Buildings/" + imageName);   // Place the building image with the correct name in this folder
     this.maxTier              = maxTier;
     this.isUnlocked           = (unlockedAtLevelNb == 0) ? true : false;
     this.unlockedAtLevelNb    = unlockedAtLevelNb;
     this.description          = description;
     this.upgradeCosts         = upgradeCosts;
     this.specializedUpgrades  = specializedUpgrades;
     this.hasRange             = hasRange;
     this.producesEnergy       = producesEnergy;
     this.specificStats        = specificStats;
     this.isUnique             = isUnique;
     this.buildingCategory     = buildingCategory;
 }