Changeset 10586 for code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseCenterpoint.h
- Timestamp:
- Sep 15, 2015, 2:20:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9667 r10586 41 41 #include <string> 42 42 #include <util/Math.h> 43 43 #include "TowerDefenseTower.h" 44 44 #include "worldentities/MobileEntity.h" 45 45 … … 60 60 void setWidth(unsigned int width) 61 61 { this->width_ = width; } 62 63 62 unsigned int getWidth(void) const 64 63 { return this->width_; } 65 66 64 void setHeight(unsigned int height) 67 65 { this->height_ = height; } 68 69 66 unsigned int getHeight(void) const 70 67 { return this->height_; } 68 void setFields(const std::string& newFields) 69 { this->fields_ = newFields; trimString(&fields_); } 70 const std::string& getFields() const 71 { return this->fields_; } 72 void setSelecterTemplate(const std::string& newTemplate) 73 { this->selecterTemplate_ = newTemplate; } 74 const std::string& getSelecterTemplate() const 75 { return this->selecterTemplate_; } 76 77 void setTower1Template(const std::string& newTemplate) 78 { this->towerTemplates_[0] = newTemplate;} 79 const std::string& getTower1Template() const 80 { return this->towerTemplates_[0]; } 81 void setTower2Template(const std::string& newTemplate) 82 { this->towerTemplates_[1] = newTemplate; } 83 const std::string& getTower2Template() const 84 { return this->towerTemplates_[1]; } 85 void setTower3Template(const std::string& newTemplate) 86 { this->towerTemplates_[2] = newTemplate; } 87 const std::string& getTower3Template() const 88 { return this->towerTemplates_[2]; } 89 void setTower4Template(const std::string& newTemplate) 90 { this->towerTemplates_[3] = newTemplate; } 91 const std::string& getTower4Template() const 92 { return this->towerTemplates_[3]; } 93 void setTower5Template(const std::string& newTemplate) 94 { this->towerTemplates_[4] = newTemplate; } 95 const std::string& getTower5Template() const 96 { return this->towerTemplates_[4]; } 97 98 void setTower1Cost(const int& newCost) 99 { this->towerCosts_[0] = newCost;} 100 const int& getTower1Cost() const 101 { return this->towerCosts_[0]; } 102 void setTower2Cost(const int& newCost) 103 { this->towerCosts_[1] = newCost; } 104 const int& getTower2Cost() const 105 { return this->towerCosts_[1]; } 106 void setTower3Cost(const int& newCost) 107 { this->towerCosts_[2] = newCost; } 108 const int& getTower3Cost() const 109 { return this->towerCosts_[2]; } 110 void setTower4Cost(const int& newCost) 111 { this->towerCosts_[3] = newCost; } 112 const int& getTower4Cost() const 113 { return this->towerCosts_[3]; } 114 void setTower5Cost(const int& newCost) 115 { this->towerCosts_[4] = newCost; } 116 const int& getTower5Cost() const 117 { return this->towerCosts_[4]; } 118 119 const int getTowerCost(int upgrade) const; 120 71 121 72 122 /** … … 79 129 { return this->tileScale_; } 80 130 81 /**82 @brief Set the template for the towers.83 @param template The template name to be applied to each tower.84 */85 void setTowerTemplate(const std::string& templateName)86 { this->towerTemplate_ = templateName; }87 88 const std::string& getTowerTemplate(void) const89 { return this->towerTemplate_; }90 91 131 private: 92 132 void checkGametype(); 93 133 void trimString(std::string*); 134 std::string selecterTemplate_; 135 std::string towerTemplates_[5]; 136 int towerCosts_[5]; 137 std::string fields_; 94 138 unsigned int width_; 95 139 unsigned int height_; 96 140 unsigned int tileScale_; 97 98 std::string towerTemplate_;99 141 }; 100 142 }
Note: See TracChangeset
for help on using the changeset viewer.