[11506] | 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 | |
---|
[11516] | 35 | #ifndef _Asteroids_H__ |
---|
| 36 | #define _Asteroids_H__ |
---|
[11506] | 37 | |
---|
[11516] | 38 | #include "asteroids/AsteroidsPrereqs.h" |
---|
[11506] | 39 | #include "gametypes/Deathmatch.h" |
---|
| 40 | #include "tools/Timer.h" |
---|
| 41 | |
---|
| 42 | namespace orxonox |
---|
| 43 | { |
---|
| 44 | |
---|
[11516] | 45 | class _AsteroidsExport Asteroids : public Deathmatch |
---|
[11506] | 46 | { |
---|
| 47 | public: |
---|
[11516] | 48 | Asteroids(Context* context); |
---|
[11506] | 49 | |
---|
| 50 | virtual void start() override; |
---|
| 51 | virtual void end() override; |
---|
[11516] | 52 | virtual void tick(float dt) override; |
---|
[11506] | 53 | virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command |
---|
| 54 | |
---|
[11516] | 55 | void setCenterpoint(AsteroidsCenterPoint* center); |
---|
[11506] | 56 | |
---|
| 57 | int getLives(){return this->lives;} |
---|
| 58 | int getPoints(){return this->point;} |
---|
[11516] | 59 | |
---|
[11506] | 60 | void costLife(); |
---|
| 61 | void addPoints(int numPoints); |
---|
[11516] | 62 | |
---|
[11528] | 63 | void spawnStone(); |
---|
| 64 | |
---|
[11506] | 65 | int lives; |
---|
| 66 | bool bEndGame; |
---|
[11516] | 67 | |
---|
[11506] | 68 | private: |
---|
[11516] | 69 | AsteroidsShip* getPlayer(); |
---|
| 70 | WeakPtr<AsteroidsCenterPoint> center_; |
---|
| 71 | WeakPtr<AsteroidsShip> player; |
---|
| 72 | WeakPtr<Camera> camera; |
---|
[11528] | 73 | WeakPtr<AsteroidsStones> stones_; |
---|
[11506] | 74 | |
---|
[11555] | 75 | |
---|
[11506] | 76 | //Context* context; |
---|
[11555] | 77 | int lives; |
---|
[11506] | 78 | int point; |
---|
[11528] | 79 | |
---|
| 80 | Timer starttimer_; //!< A timer to delay the start of the game. |
---|
[11555] | 81 | Timer enemySpawnTimer; |
---|
[11506] | 82 | }; |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | #endif /* _Invader_H__ */ |
---|