Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Asteroid_HS17/src/modules/asteroids/Asteroids.h @ 11534

Last change on this file since 11534 was 11528, checked in by vyang, 7 years ago

Spawn Funktion fuer die Asteroiden veraendert

File size: 2.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 *      Florian Zinggeler
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file Invader.h
31    @brief Gametype.
32    @ingroup Invader
33*/
34
35#ifndef _Asteroids_H__
36#define _Asteroids_H__
37
38#include "asteroids/AsteroidsPrereqs.h"
39#include "gametypes/Deathmatch.h"
40#include "tools/Timer.h"
41
42namespace orxonox
43{
44
45    class _AsteroidsExport Asteroids : public Deathmatch
46    {
47        public:
48            Asteroids(Context* context);
49
50            virtual void start() override;
51            virtual void end() override;
52            virtual void tick(float dt) override;
53            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
54
55            void setCenterpoint(AsteroidsCenterPoint* center);
56
57            int getLives(){return this->lives;}
58            int getPoints(){return this->point;}
59           
60            void costLife();
61            void addPoints(int numPoints);
62
63            void spawnStone();
64
65            int lives;
66            bool bEndGame;
67           
68        private:
69            void toggleShowLevel(){bShowLevel = !bShowLevel;}
70            void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats.
71            AsteroidsShip* getPlayer();
72            WeakPtr<AsteroidsCenterPoint> center_;
73            WeakPtr<AsteroidsShip> player;
74            WeakPtr<Camera> camera;
75            WeakPtr<AsteroidsStones> stones_;
76
77            Timer enemySpawnTimer;
78            //Context* context;
79            int level;
80            int point;
81            bool b_combo;
82
83            Timer starttimer_; //!< A timer to delay the start of the game.
84    };
85}
86
87#endif /* _Invader_H__ */
Note: See TracBrowser for help on using the repository browser.