Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/SuperOrxoBros_HS18/src/modules/jump/JumpCenterpoint.h @ 12177

Last change on this file since 12177 was 12177, checked in by siramesh, 5 years ago

Super Orxo Bros Final (Sidharth Ramesh, Nisa Balta, Jeff Ren)

File size: 7.5 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 *      Fabien Vultier
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _JumpCenterpoint_H__
30#define _JumpCenterpoint_H__
31
32#include "jump/JumpPrereqs.h"
33#include "worldentities/StaticEntity.h"
34
35namespace orxonox
36{
37   
38    /**
39    @brief
40        @brief The JumpCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the JumpCenterpoint.
41    */
42    class _JumpExport JumpCenterpoint : public StaticEntity
43    {
44        public:
45            JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
46            virtual ~JumpCenterpoint() {}
47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a JumpCenterpoint through XML.
48            void setPlatformStaticTemplate(const std::string& balltemplate)
49                { this->platformStaticTemplate_ = balltemplate; }
50            const std::string& getPlatformStaticTemplate() const
51                { return this->platformStaticTemplate_; }
52            void setPlatformHMoveTemplate(const std::string& balltemplate)
53                { this->platformHMoveTemplate_ = balltemplate; }
54            const std::string& getPlatformHMoveTemplate() const
55                { return this->platformHMoveTemplate_; }
56            void setPlatformVMoveTemplate(const std::string& balltemplate)
57                { this->platformVMoveTemplate_ = balltemplate; }
58            const std::string& getPlatformVMoveTemplate() const
59                { return this->platformVMoveTemplate_; }
60            void setPlatformDisappearTemplate(const std::string& balltemplate)
61                { this->platformDisappearTemplate_ = balltemplate; }
62            const std::string& getPlatformDisappearTemplate() const
63                { return this->platformDisappearTemplate_; }
64            void setPlatformTimerTemplate(const std::string& balltemplate)
65                { this->platformTimerTemplate_ = balltemplate; }
66            const std::string& getPlatformTimerTemplate() const
67                { return this->platformTimerTemplate_; }
68            void setPlatformFakeTemplate(const std::string& balltemplate)
69                { this->platformFakeTemplate_ = balltemplate; }
70            const std::string& getPlatformFakeTemplate() const
71                { return this->platformFakeTemplate_; }
72            void setProjectileTemplate(const std::string& newTemplate)
73                { this->projectileTemplate_ = newTemplate; }
74            const std::string& getProjectileTemplate() const
75                { return this->projectileTemplate_; }
76            void setSpringTemplate(const std::string& newTemplate)
77                { this->springTemplate_ = newTemplate; }
78            const std::string& getSpringTemplate() const
79                { return this->springTemplate_; }
80            void setRocketTemplate(const std::string& newTemplate)
81                { this->rocketTemplate_ = newTemplate; }
82            const std::string& getRocketTemplate() const
83                { return this->rocketTemplate_; }
84            void setPropellerTemplate(const std::string& newTemplate)
85                { this->propellerTemplate_ = newTemplate; }
86            const std::string& getPropellerTemplate() const
87                { return this->propellerTemplate_; }
88            void setBootsTemplate(const std::string& newTemplate)
89                { this->bootsTemplate_ = newTemplate; }
90            const std::string& getBootsTemplate() const
91                { return this->bootsTemplate_; }
92            void setShieldTemplate(const std::string& newTemplate)
93                { this->shieldTemplate_ = newTemplate; }
94            const std::string& getShieldTemplate() const
95                { return this->shieldTemplate_; }
96            void setFigureTemplate(const std::string& newTemplate)
97                { this->figureTemplate_ = newTemplate; }
98            const std::string& getFigureTemplate() const
99                { return this->figureTemplate_; }
100            void setEnemy1Template(const std::string& newTemplate)
101                { this->enemy1Template_ = newTemplate; }
102            const std::string& getEnemy1Template() const
103                { return this->enemy1Template_; }
104            void setEnemy2Template(const std::string& newTemplate)
105                { this->enemy2Template_ = newTemplate; }
106            const std::string& getEnemy2Template() const
107                { return this->enemy2Template_; }
108            void setEnemy3Template(const std::string& newTemplate)
109                { this->enemy3Template_ = newTemplate; }
110            const std::string& getEnemy3Template() const
111                { return this->enemy3Template_; }
112            void setEnemy4Template(const std::string& newTemplate)
113                { this->enemy4Template_ = newTemplate; }
114            const std::string& getEnemy4Template() const
115                { return this->enemy4Template_; }
116            void setFieldDimension(const Vector2& dimension)
117                { this->width_ = dimension.x; this->height_ = dimension.y; }
118            Vector2 getFieldDimension() const
119                { return Vector2(this->width_, this->height_); }
120            void setSectionLength(const float sectionLength)
121                { this->sectionLength_ = sectionLength; }
122            float getSectionLength() const
123                { return sectionLength_; }
124            void setPlatformSpeed(const float platformSpeed)
125                { this->platformSpeed_ = platformSpeed; }
126            float getPlatformSpeed() const
127                { return platformSpeed_; }
128            void setCameraOffset(const float cameraOffset)
129                { this->cameraOffset_ = cameraOffset; }
130            float getCameraOffset() const
131                { return cameraOffset_; }
132        private:
133            void checkGametype();
134            std::string platformStaticTemplate_;
135            std::string platformHMoveTemplate_;
136            std::string platformVMoveTemplate_;
137            std::string platformDisappearTemplate_;
138            std::string platformTimerTemplate_;
139            std::string platformFakeTemplate_;
140            std::string projectileTemplate_;
141            std::string springTemplate_;
142            std::string rocketTemplate_;
143            std::string propellerTemplate_;
144            std::string bootsTemplate_;
145            std::string shieldTemplate_;
146            std::string figureTemplate_;
147            std::string enemy1Template_;
148            std::string enemy2Template_;
149            std::string enemy3Template_;
150            std::string enemy4Template_;
151            float width_;
152            float height_;
153            float sectionLength_;
154            float platformSpeed_;
155            float cameraOffset_;
156    };
157}
158
159#endif /* _JumpCenterpoint_H__ */
Note: See TracBrowser for help on using the repository browser.