Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h @ 10205

Last change on this file since 10205 was 9667, checked in by landauf, 11 years ago

merged core6 back to trunk

  • Property svn:eol-style set to native
File size: 3.0 KB
RevLine 
[9110]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/**
[9141]30 @brief
31 See TowerDefenseReadme.txt for Information.
32 @ingroup TowerDefense
33 */
[9110]34
[9141]35
[9110]36#ifndef _TowerDefenseCenterpoint_H__
37#define _TowerDefenseCenterpoint_H__
38
[9112]39#include "towerdefense/TowerDefensePrereqs.h"
[9110]40
41#include <string>
42#include <util/Math.h>
43
[9175]44#include "worldentities/MobileEntity.h"
[9110]45
46namespace orxonox
47{
[9175]48    class _TowerDefenseExport TowerDefenseCenterpoint : public MobileEntity
[9110]49    {
50        public:
[9667]51            TowerDefenseCenterpoint(Context* context);
[9110]52            virtual ~TowerDefenseCenterpoint() {}
53
[9141]54            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
55            virtual void changedGametype();
[9272]56
[9110]57            /**
[9141]58            @brief The width and hight in number of tiles. Default is 15 for both.
[9110]59            */
60            void setWidth(unsigned int width)
61                { this->width_ = width; }
[9272]62
63            unsigned int getWidth(void) const
[9110]64                { return this->width_; }
[9272]65
[9110]66            void setHeight(unsigned int height)
67                { this->height_ = height; }
[9272]68
69            unsigned int getHeight(void) const
[9110]70                { return this->height_; }
[9272]71
[9110]72            /**
[9272]73                @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
74            */
75            void setTileScale(unsigned int tileScale)
76                { this->tileScale_ = tileScale; }
77
78            unsigned int getTileScale(void) const
79                { return this->tileScale_; }
80
81            /**
[9112]82            @brief Set the template for the towers.
83            @param template The template name to be applied to each tower.
[9110]84            */
[9112]85            void setTowerTemplate(const std::string& templateName)
86                { this->towerTemplate_ = templateName; }
[9272]87
88            const std::string& getTowerTemplate(void) const
[9112]89                { return this->towerTemplate_; }
[9110]90
91        private:
[9141]92            void checkGametype();
[9272]93
[9110]94            unsigned int width_;
95            unsigned int height_;
[9272]96            unsigned int tileScale_;
97
[9112]98            std::string towerTemplate_;
[9110]99    };
100}
101
102#endif /* _TowerDefenseCenterpoint_H__ */
Note: See TracBrowser for help on using the repository browser.