Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/TixyTaxyTorxy_HS18/src/modules/TixyTaxyTorxy/TixyTaxyTorxyField.h @ 12149

Last change on this file since 12149 was 12149, checked in by thomkell, 5 years ago

final

File size: 3.3 KB
Line 
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
41namespace orxonox
42{
43    enum class TixyTaxyTorxyFieldType
44    { 
45        FREE,
46        STREET, 
47        START, 
48        END,
49        OBSTACLE,
50        TOWER1,
51        TOWER2,
52        TOWER
53    };
54
55    /**
56    @brief
57    See TixyTaxyTorxy
58TixyTaxyTorxyReadme.txt for Information.
59    @ingroup TixyTaxyTorxy
60TixyTaxyTorxy
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; }
70            const bool isTower1() const
71                { return type_==TixyTaxyTorxyFieldType::TOWER1; }   
72            const bool isTower2() const
73                { return type_==TixyTaxyTorxyFieldType::TOWER2; }
74            virtual void create(char object, char param);
75            virtual void setCenterpoint(TixyTaxyTorxyCenterpoint* center);
76            // virtual void upgrade();
77             // virtual int getUpgrade();
78            // virtual TixyTaxyTorxyFieldType getType();
79            virtual void setUpgrade(int upgrade);
80            // virtual bool canUpgrade();
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);
89            virtual int getAngle();         
90        private:
91
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
106TixyTaxyTorxyField_H__ */
Note: See TracBrowser for help on using the repository browser.