Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.h @ 10587

Last change on this file since 10587 was 10586, checked in by fvultier, 9 years ago

Removed unuses classes and templates. The enemies move now along a path defined in the XML level file and no more along a static hard coded path.

File size: 2.8 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 @brief
31 See TowerDefenseReadme.txt for Information.
32 @ingroup TowerDefense
33 */
34
35
36#ifndef _TowerDefenseField_H__
37#define _TowerDefenseField_H__
38
39#include "towerdefense/TowerDefensePrereqs.h"
40#include "TowerDefenseTower.h"
41 #include "TowerDefenseCenterpoint.h"
42#include <string>
43#include "graphics/Model.h"
44#include "worldentities/MovableEntity.h"
45
46namespace orxonox
47{
48    enum TowerDefenseFieldType
49    { 
50        FREE,
51        STREET, 
52        START, 
53        END,
54        TOWER
55    };
56
57
58    class _TowerDefenseExport TowerDefenseField : public MovableEntity
59    {
60        public:
61            TowerDefenseField(Context* context);
62            virtual ~TowerDefenseField() {}
63            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
64            const bool isFree() const
65                { return type_==FREE; }
66            virtual void create(char object, char param);
67            virtual void setCenterpoint(TowerDefenseCenterpoint* center);
68            virtual void upgrade();
69            virtual int getUpgrade();
70            virtual TowerDefenseFieldType getType();
71            virtual void setUpgrade(int upgrade);
72            virtual bool canUpgrade();
73            virtual void createFree(int orientation);
74            virtual void createStart(int orientation);
75            virtual void createEnd(int orientation);
76            virtual void createStraight(int orientation);
77            virtual void createLCurve(int orientation);
78            virtual void createRCurve(int orientation);
79            virtual void createTower(int upgrade);
80            virtual int getAngle();
81        private:
82            virtual void setAngle(int newAngle);           
83            virtual void destroyTower();
84            int angle_;
85            TowerDefenseFieldType type_;
86            Model* model_;
87            TowerDefenseTower* tower_;
88            TowerDefenseCenterpoint* center_;
89            int upgrade_;
90
91    };   
92}
93
94#endif /* _TowerDefenseField_H__ */
Note: See TracBrowser for help on using the repository browser.