- Timestamp:
- Apr 29, 2012, 3:42:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9112 r9141 28 28 29 29 /** 30 @file TowerDefenseCenterpoint.h 31 @brief Declaration of the TowerDefenseCenterpoint class. 32 @ingroup TowerDefense 33 */ 30 @brief 31 See TowerDefenseReadme.txt for Information. 32 @ingroup TowerDefense 33 */ 34 34 35 35 36 #ifndef _TowerDefenseCenterpoint_H__ … … 39 40 40 41 #include <string> 41 42 42 #include <util/Math.h> 43 43 … … 46 46 namespace orxonox 47 47 { 48 49 /**50 @brief51 52 53 @author54 55 @ingroup TowerDefense56 */57 48 class _TowerDefenseExport TowerDefenseCenterpoint : public StaticEntity 58 49 { 59 50 public: 60 TowerDefenseCenterpoint(BaseObject* creator); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually TowerDefense.51 TowerDefenseCenterpoint(BaseObject* creator); 61 52 virtual ~TowerDefenseCenterpoint() {} 62 53 63 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a TowerDefenseCenterpoint through XML. 64 65 virtual void changedGametype(); //!< Is called when the gametype has changed. 54 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 virtual void changedGametype(); 66 56 67 57 /** 68 @brief Set the width of the playing field. 69 @param width The width in number of tiles. 58 @brief The width and hight in number of tiles. Default is 15 for both. 70 59 */ 71 60 void setWidth(unsigned int width) 72 61 { this->width_ = width; } 73 /** 74 @brief Get the width of the playing field. 75 @return Returns the width in number of tiles. 76 */ 77 unsigned int getWidth(void) const 62 63 unsigned int getWidth(void) const 78 64 { return this->width_; } 79 65 80 /**81 @brief Set the height of the playing field.82 @param height The height in number of tiles.83 */84 66 void setHeight(unsigned int height) 85 67 { this->height_ = height; } 86 /** 87 @brief Get the height of the playing field. 88 @return Returns the height in number of tiles. 89 */ 90 unsigned int getHeight(void) const 68 69 unsigned int getHeight(void) const 91 70 { return this->height_; } 92 71 … … 97 76 void setTowerTemplate(const std::string& templateName) 98 77 { this->towerTemplate_ = templateName; } 99 /** 100 @brief Get the template for the towers. 101 @return Returns the template name to be applied to each tower. 102 */ 103 const std::string& getTowerTemplate(void) const 78 79 const std::string& getTowerTemplate(void) const 104 80 { return this->towerTemplate_; } 105 106 81 107 82 private: 108 void checkGametype(); //!< Checks whether the gametype is TowerDefense and if it is, sets its centerpoint.83 void checkGametype(); 109 84 110 85 unsigned int width_; 111 86 unsigned int height_; 112 87 std::string towerTemplate_; 113 114 88 }; 115 89 }
Note: See TracChangeset
for help on using the changeset viewer.