/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * Viviane Yang * Co-authors: * ... * */ /** @file Asteroids2D.h @brief Gametype: - Goal: Survive as long as you can, do not collide with stones - spawns stones in every level up - if you shoot and hit a stone, it will spit into two smaller stones @ingroup Asteroids2D */ #ifndef _Asteroids2D_H__ #define _Asteroids2D_H__ #include "asteroids2D/Asteroids2DPrereqs.h" #include "gametypes/Deathmatch.h" #include "tools/Timer.h" namespace orxonox { class _Asteroids2DExport Asteroids2D : public Deathmatch { public: Asteroids2D(Context* context); virtual void start() override; virtual void end() override; //updates the game every few ns virtual void tick(float dt) override; virtual void playerPreSpawn(PlayerInfo* player) override; void levelUp(); //For HUD int getLives(){return this->lives;} int getLevel(){return this->level;} int getPoints(){return this->point;} int getMultiplier(){return this->multiplier;} //Generate Stones void spawnStone(); void setCenterpoint(Asteroids2DCenterPoint* center); void addPoints(int numPoints); virtual void addBots(unsigned int amount) override{} // playerInfo_; void toggleShowLevel(){bShowLevel = !bShowLevel;} WeakPtr center_; int level; int point; bool b_combo, firstTick_; Timer comboTimer; Timer showLevelTimer; Timer levelupTimer; Timer endGameTimer; }; } #endif /* _Asteroids2D_H__ */