Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/orxokart/OrxoKartOrigin.h @ 12211

Last change on this file since 12211 was 12116, checked in by ottka, 6 years ago

level select in level file

File size: 2.6 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 *      Manuel Meier
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _OrxoKartOrigin_H__
30#define _OrxoKartOrigin_H__
31
32#include "OrxoKartPrereqs.h"
33
34#include "worldentities/StaticEntity.h"
35
36namespace orxonox
37{
38   
39    /**
40    @brief
41        The OrxoKartOrigin implements the playing field @ref orxonox::OrxoKart "OrxoKart" 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.
43        For an example, have a look at the <code>OrxoKart1.oxw</code> level file.
44
45    */
46    class _OrxoKartExport OrxoKartOrigin : public StaticEntity
47    {
48        public:
49            OrxoKartOrigin(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually OrxoKart.
50            virtual ~OrxoKartOrigin() = default;
51            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a OrxoKartOrigin through XML.
52           
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 setLevel(int level)
64                { this->level_ = level; }
65            inline int getLevel() const
66                { return this->level_; }   
67
68        private:
69            void checkGametype();
70       
71            int numCells_;
72            int cellSize_;
73            int level_;
74    };
75}
76
77#endif /* _OrxoKartOrigin_H__ */
Note: See TracBrowser for help on using the repository browser.