public static Building CreateBuilding(string buildingID)
        {
            Building building = null;

            switch (buildingID)
            {
                case ("ARMYCAMP"):
                    building = new ArmyCamp();
                    break;

                case ("BARRACKS"):
                    building = new Barracks();
                    break;

                case ("LABORATORY"):
                    building = new Laboratory();
                    break;

                case ("SPELLFACTORY"):
                    building = new SpellFactory();
                    break;

                case ("BARBARIANKING"):
                    building = new BarbarianKing();
                    break;

                case ("ARCHERQUEEN"):
                    building = new ArcherQueen();
                    break;

                case ("ELIXIRCOLLECTOR"):
                    building = new ElixirCollector();
                    break;

                case ("ELIXIRSTORAGE"):
                    building = new ElixirStorage();
                    break;

                case ("GOLDMINE"):
                    building = new GoldMine();
                    break;

                case ("GOLDSTORAGE"):
                    building = new GoldStorage();
                    break;

                case ("BUILDERSHUT"):
                    building = new BuildersHut();
                    break;

                case ("DARKELIXIRPUMP"):
                    building = new DarkElixirDrill();
                    break;

                case ("DARKELIXIRSTORAGE"):
                    building = new DarkElixirStorage();
                    break;

                case ("CANNON"):
                    building = new Cannon();
                    break;

                case ("ARCHERTOWER"):
                    building = new ArcherTower();
                    break;

                case ("WALL"):
                    building = new Wall();
                    break;

                case ("MORTAR"):
                    building = new Mortar();
                    break;

                case ("BOMB"):
                    building = new Bomb();
                    break;

                case ("AIRDEFENSE"):
                    building = new AirDefense();
                    break;

                case ("SPRINGTRAP"):
                    building = new SpringTrap();
                    break;

                case ("WIZARDTOWER"):
                    building = new WizardTower();
                    break;

                case ("GIANTBOMB"):
                    building = new GiantBomb();
                    break;

                case ("HIDDENTESLA"):
                    building = new HiddenTesla();
                    break;

                case ("XBOW"):
                    building = new XBow();
                    break;

                default:
                    building = new Building();
                    building.BuildingID = buildingID;
                    break;
            }

            return building;
        }
Exemple #2
0
        public static Building CreateBuilding(string buildingID)
        {
            Building building = null;

            switch (buildingID)
            {
            case ("ARMYCAMP"):
                building = new ArmyCamp();
                break;

            case ("BARRACKS"):
                building = new Barracks();
                break;

            case ("LABORATORY"):
                building = new Laboratory();
                break;

            case ("SPELLFACTORY"):
                building = new SpellFactory();
                break;

            case ("BARBARIANKING"):
                building = new BarbarianKing();
                break;

            case ("ARCHERQUEEN"):
                building = new ArcherQueen();
                break;

            case ("ELIXIRCOLLECTOR"):
                building = new ElixirCollector();
                break;

            case ("ELIXIRSTORAGE"):
                building = new ElixirStorage();
                break;

            case ("GOLDMINE"):
                building = new GoldMine();
                break;

            case ("GOLDSTORAGE"):
                building = new GoldStorage();
                break;

            case ("BUILDERSHUT"):
                building = new BuildersHut();
                break;

            case ("DARKELIXIRPUMP"):
                building = new DarkElixirDrill();
                break;

            case ("DARKELIXIRSTORAGE"):
                building = new DarkElixirStorage();
                break;

            case ("CANNON"):
                building = new Cannon();
                break;

            case ("ARCHERTOWER"):
                building = new ArcherTower();
                break;

            case ("WALL"):
                building = new Wall();
                break;

            case ("MORTAR"):
                building = new Mortar();
                break;

            case ("BOMB"):
                building = new Bomb();
                break;

            case ("AIRDEFENSE"):
                building = new AirDefense();
                break;

            case ("SPRINGTRAP"):
                building = new SpringTrap();
                break;

            case ("WIZARDTOWER"):
                building = new WizardTower();
                break;

            case ("GIANTBOMB"):
                building = new GiantBomb();
                break;

            case ("HIDDENTESLA"):
                building = new HiddenTesla();
                break;

            case ("XBOW"):
                building = new XBow();
                break;

            default:
                building            = new Building();
                building.BuildingID = buildingID;
                break;
            }

            return(building);
        }