Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h @ 10142

Last change on this file since 10142 was 10142, checked in by maxima, 9 years ago

hzilly. Alle files zusammengefuegt.

  • Property svn:eol-style set to native
File size: 3.0 KB
RevLine 
[9098]1/*
[9112]2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
[9098]4 *
[9112]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 *
[9098]27 */
[9272]28
[9141]29 /**
[9272]30    @brief
31        GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
32
33    @ingroup TowerDefense
[9141]34 */
[9098]35
[9272]36
[9112]37#ifndef _TowerDefense_H__
38#define _TowerDefense_H__
[10105]39#include "TDCoordinate.h"
[9112]40#include "towerdefense/TowerDefensePrereqs.h"
41#include "gametypes/Deathmatch.h"
[10109]42#include "TowerDefenseEnemy.h"
43#include "util/Output.h"
[9272]44
[10109]45
[9211]46 #include "TowerDefensePlayerStats.h"
[9272]47
[9112]48namespace orxonox
49{
[9272]50    class _TowerDefenseExport TowerDefense : public Deathmatch
[9112]51    {
[9272]52    public:
[9667]53        TowerDefense(Context* context);
[9272]54        virtual ~TowerDefense();
[9143]55
[10109]56        std::vector<TowerDefenseEnemy*> TowerDefenseEnemyvector;
[10142]57        bool towermatrix[16][16];
[10141]58        void addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr); 
[9272]59        virtual void start(); //<! The function is called when the gametype starts
60        virtual void end();
61        virtual void tick(float dt);
62        //virtual void playerEntered(PlayerInfo* player);
63        //virtual bool playerLeft(PlayerInfo* player);
[9143]64
[10140]65        int credits;
66        int life;
67        int waves;
[9272]68        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
[9347]69        //virtual void playerScored(PlayerInfo* player, int score);
[9272]70
71
72        /*  Called by TowerDefenseCenterpoint upon game start
73            The centerpoint is used to create towers
74        */
75        void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
76
77        /* Adds a tower at x, y in the playfield */
78        void addTower(int x, int y);
79
80        /* Part of a temporary hack to allow the player to add towers */
81        ConsoleCommand* dedicatedAddTower_;
82
83        //TODO: void spawnNewWave()
84        //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
85        //      or spawn a new wave when the old wave has been killed           (event driven)
86
87
88    private:
89        TowerDefenseCenterpoint *center_;
[10132]90        float time;
[9272]91
92        /* handles stats */
93        TowerDefensePlayerStats *stats_;
94        bool hasEnoughCreditForTower(TowerCost towerCost);
95
[10091]96        std::vector<TowerTurret*> towers_;
[9112]97    };
98}
99
100#endif /* _TowerDefense_H__ */
Note: See TracBrowser for help on using the repository browser.