[12064] | 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: |
---|
| 23 | * ... |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | #ifndef _TixyTaxyTorxyField_H__ |
---|
| 32 | #define _TixyTaxyTorxyField_H__ |
---|
| 33 | |
---|
| 34 | #include "TixyTaxyTorxy/TixyTaxyTorxyPrereqs.h" |
---|
| 35 | #include "TixyTaxyTorxyTower.h" |
---|
| 36 | #include "TixyTaxyTorxyCenterpoint.h" |
---|
| 37 | #include <string> |
---|
| 38 | #include "graphics/Model.h" |
---|
| 39 | #include "worldentities/MovableEntity.h" |
---|
| 40 | |
---|
| 41 | namespace orxonox |
---|
| 42 | { |
---|
| 43 | enum class TixyTaxyTorxyFieldType |
---|
| 44 | { |
---|
| 45 | FREE, |
---|
| 46 | STREET, |
---|
| 47 | START, |
---|
| 48 | END, |
---|
| 49 | OBSTACLE, |
---|
[12149] | 50 | TOWER1, |
---|
| 51 | TOWER2, |
---|
[12064] | 52 | TOWER |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | @brief |
---|
| 57 | See TixyTaxyTorxy |
---|
| 58 | TixyTaxyTorxyReadme.txt for Information. |
---|
| 59 | @ingroup TixyTaxyTorxy |
---|
| 60 | TixyTaxyTorxy |
---|
| 61 | */ |
---|
| 62 | class _TixyTaxyTorxyExport TixyTaxyTorxyField : public MovableEntity |
---|
| 63 | { |
---|
| 64 | public: |
---|
| 65 | TixyTaxyTorxyField(Context* context); |
---|
| 66 | virtual ~TixyTaxyTorxyField() {} |
---|
| 67 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; |
---|
| 68 | const bool isFree() const |
---|
| 69 | { return type_==TixyTaxyTorxyFieldType::FREE; } |
---|
[12149] | 70 | const bool isTower1() const |
---|
| 71 | { return type_==TixyTaxyTorxyFieldType::TOWER1; } |
---|
| 72 | const bool isTower2() const |
---|
| 73 | { return type_==TixyTaxyTorxyFieldType::TOWER2; } |
---|
[12064] | 74 | virtual void create(char object, char param); |
---|
| 75 | virtual void setCenterpoint(TixyTaxyTorxyCenterpoint* center); |
---|
[12086] | 76 | // virtual void upgrade(); |
---|
| 77 | // virtual int getUpgrade(); |
---|
| 78 | // virtual TixyTaxyTorxyFieldType getType(); |
---|
[12064] | 79 | virtual void setUpgrade(int upgrade); |
---|
[12086] | 80 | // virtual bool canUpgrade(); |
---|
[12064] | 81 | virtual void createFree(int orientation); |
---|
| 82 | virtual void createStart(int orientation); |
---|
| 83 | virtual void createEnd(int orientation); |
---|
| 84 | virtual void createStraight(int orientation); |
---|
| 85 | virtual void createLCurve(int orientation); |
---|
| 86 | virtual void createRCurve(int orientation); |
---|
| 87 | virtual void createObstacle(int orientation); |
---|
| 88 | virtual void createTower(int upgrade); |
---|
[12149] | 89 | virtual int getAngle(); |
---|
[12064] | 90 | private: |
---|
[12149] | 91 | |
---|
[12064] | 92 | virtual void setAngle(int newAngle); |
---|
| 93 | virtual void destroyTower(); |
---|
| 94 | int angle_; |
---|
| 95 | TixyTaxyTorxyFieldType type_; |
---|
| 96 | Model* modelGround_; |
---|
| 97 | Model* modelObject_; |
---|
| 98 | TixyTaxyTorxyTower* tower_; |
---|
| 99 | TixyTaxyTorxyCenterpoint* center_; |
---|
| 100 | int upgrade_; |
---|
| 101 | |
---|
| 102 | }; |
---|
| 103 | } |
---|
| 104 | |
---|
| 105 | #endif /* _TixyTaxyTorxy |
---|
| 106 | TixyTaxyTorxyField_H__ */ |
---|