[10751] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
[10930] | 23 | * Manuel Meier |
---|
[10751] | 24 | * Co-authors: |
---|
[11196] | 25 | * Tomer Gidron |
---|
[10751] | 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _HoverOrigin_H__ |
---|
| 30 | #define _HoverOrigin_H__ |
---|
| 31 | |
---|
| 32 | #include "HoverPrereqs.h" |
---|
| 33 | |
---|
| 34 | #include "worldentities/StaticEntity.h" |
---|
| 35 | |
---|
| 36 | namespace orxonox |
---|
| 37 | { |
---|
| 38 | |
---|
| 39 | /** |
---|
| 40 | @brief |
---|
| 41 | The HoverOrigin implements the playing field @ref orxonox::Hover "Hover" takes place in and allows for many parameters of the minigame to be set. |
---|
| 42 | The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis. |
---|
[11099] | 43 | For an example, have a look at the <code>Hover.oxw</code> level file. |
---|
[10751] | 44 | |
---|
| 45 | */ |
---|
| 46 | class _HoverExport HoverOrigin : public StaticEntity |
---|
| 47 | { |
---|
| 48 | public: |
---|
| 49 | HoverOrigin(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Hover. |
---|
[11071] | 50 | virtual ~HoverOrigin() = default; |
---|
| 51 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a HoverOrigin through XML. |
---|
[10751] | 52 | |
---|
[11040] | 53 | inline void setNumCells(int numCells) |
---|
| 54 | { this->numCells_ = numCells; } |
---|
| 55 | inline int getNumCells() const |
---|
| 56 | { return this->numCells_; } |
---|
| 57 | |
---|
| 58 | inline void setCellSize(int cellSize) |
---|
| 59 | { this->cellSize_ = cellSize; } |
---|
| 60 | inline int getCellSize() const |
---|
| 61 | { return this->cellSize_; } |
---|
| 62 | |
---|
| 63 | inline void setCellHeight(int cellHeight) |
---|
| 64 | { this->cellHeight_ = cellHeight; } |
---|
| 65 | inline int getCellHeight() const |
---|
| 66 | { return this->cellHeight_; } |
---|
| 67 | |
---|
[11198] | 68 | inline void setWallThickness(int wallThickness) |
---|
| 69 | { this->wallThickness_ = wallThickness; } |
---|
| 70 | inline int getWallThickness() const |
---|
| 71 | { return this->wallThickness_; } |
---|
[11196] | 72 | |
---|
[11177] | 73 | //pickup template set and get for destroy hover pickup |
---|
| 74 | |
---|
[11169] | 75 | inline void setPickupTemplate(std::string pickupTemplate) |
---|
| 76 | { this->pickupTemplate_ = pickupTemplate; } |
---|
| 77 | inline std::string getPickupTemplate() const |
---|
[11168] | 78 | { return this->pickupTemplate_; } |
---|
| 79 | |
---|
[11169] | 80 | inline void setPickupRepresentationTemplate(std::string pickupRepresenationaTemplate) |
---|
| 81 | { this->pickupRepresentationTemplate_ = pickupRepresenationaTemplate; } |
---|
| 82 | inline std::string getPickupRepresentationTemplate() const |
---|
| 83 | { return this->pickupRepresentationTemplate_; } |
---|
[11168] | 84 | |
---|
[11177] | 85 | //pickup template get and set for damage hover pickup |
---|
| 86 | |
---|
[11182] | 87 | inline void setPickupTemplateSpeed(std::string pickupTemplateSpeed) |
---|
| 88 | { this->pickupTemplateSpeed_ = pickupTemplateSpeed; } |
---|
| 89 | inline std::string getPickupTemplateSpeed() const |
---|
| 90 | { return this->pickupTemplateSpeed_; } |
---|
[11177] | 91 | |
---|
[11182] | 92 | inline void setPickupRepresentationTemplateSpeed(std::string pickupRepresenationaTemplateSpeed) |
---|
| 93 | { this->pickupRepresentationTemplateSpeed_ = pickupRepresenationaTemplateSpeed; } |
---|
| 94 | inline std::string getPickupRepresentationTemplateSpeed() const |
---|
| 95 | { return this->pickupRepresentationTemplateSpeed_; } |
---|
[11177] | 96 | |
---|
[11182] | 97 | |
---|
| 98 | //pickup template get and set for shrink hover pickup |
---|
| 99 | |
---|
| 100 | inline void setPickupTemplateShrink(std::string pickupTemplateShrink) |
---|
| 101 | { this->pickupTemplateShrink_ = pickupTemplateShrink; } |
---|
| 102 | inline std::string getPickupTemplateShrink() const |
---|
| 103 | { return this->pickupTemplateShrink_; } |
---|
| 104 | |
---|
| 105 | inline void setPickupRepresentationTemplateShrink(std::string pickupRepresenationaTemplateShrink) |
---|
| 106 | { this->pickupRepresentationTemplateShrink_ = pickupRepresenationaTemplateShrink; } |
---|
| 107 | inline std::string getPickupRepresentationTemplateShrink() const |
---|
| 108 | { return this->pickupRepresentationTemplateShrink_; } |
---|
| 109 | |
---|
[11177] | 110 | //get and set for obstacle template |
---|
| 111 | |
---|
| 112 | inline void setObstacleTemplate(std::string obstacleTemplate) |
---|
| 113 | { this->obstacleTemplate_ = obstacleTemplate; } |
---|
| 114 | inline std::string getObstacleTemplate() const |
---|
| 115 | { return this->obstacleTemplate_; } |
---|
| 116 | |
---|
[11192] | 117 | //get and set for ground template |
---|
| 118 | |
---|
| 119 | inline void setGroundTemplate(std::string groundTemplate) |
---|
| 120 | { this->groundTemplate_ = groundTemplate; } |
---|
| 121 | inline std::string getGroundTemplate() const |
---|
| 122 | { return this->groundTemplate_; } |
---|
| 123 | |
---|
[10751] | 124 | private: |
---|
| 125 | void checkGametype(); |
---|
[11177] | 126 | |
---|
[10751] | 127 | |
---|
[11040] | 128 | int numCells_; |
---|
| 129 | int cellSize_; |
---|
| 130 | int cellHeight_; |
---|
[11196] | 131 | int wallThickness_; |
---|
[11169] | 132 | |
---|
| 133 | // Tempaltes for the destroy hover pickup |
---|
[11168] | 134 | std::string pickupTemplate_; |
---|
[11169] | 135 | std::string pickupRepresentationTemplate_; |
---|
[11177] | 136 | |
---|
| 137 | // Tempaltes for the damage hover pickup |
---|
[11182] | 138 | std::string pickupTemplateSpeed_; |
---|
| 139 | std::string pickupRepresentationTemplateSpeed_; |
---|
[11177] | 140 | |
---|
[11182] | 141 | // Tempaltes for the shrink hover pickup |
---|
| 142 | std::string pickupTemplateShrink_; |
---|
| 143 | std::string pickupRepresentationTemplateShrink_; |
---|
| 144 | |
---|
[11177] | 145 | //Template for crate obstacle |
---|
| 146 | std::string obstacleTemplate_; |
---|
[11192] | 147 | |
---|
| 148 | //Template for ground cell |
---|
| 149 | std::string groundTemplate_; |
---|
[10751] | 150 | }; |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | #endif /* _HoverOrigin_H__ */ |
---|