Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 11561 was 11555, checked in by vyang, 7 years ago

Level file: korrekte Kameraposition, Raumschiff bewegt sich nicht, schiesst aber → wird AsteroidsShip ueberhaupt geladen? AsteroidsShip: neue Steuerung (vgl Jump, Rotation muss noch angepasst werden)

File size: 2.3 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            AsteroidsShip* getPlayer();
70            WeakPtr<AsteroidsCenterPoint> center_;
71            WeakPtr<AsteroidsShip> player;
72            WeakPtr<Camera> camera;
73            WeakPtr<AsteroidsStones> stones_;
74
75
76            //Context* context;
77            int lives;
78            int point;
79
80            Timer starttimer_; //!< A timer to delay the start of the game.
81            Timer enemySpawnTimer;
82    };
83}
84
85#endif /* _Invader_H__ */
Note: See TracBrowser for help on using the repository browser.