- Timestamp:
- Mar 23, 2017, 3:53:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.h
r11370 r11378 21 21 * 22 22 * Author: 23 * F lorian Zinggeler23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 25 * ... … … 28 28 29 29 /** 30 @file Invader.h31 @brief Gametype.32 @ingroup Invader30 @file Pong.h 31 @brief Declaration of the Pong class. 32 @ingroup Pong 33 33 */ 34 34 35 #ifndef _ Invader_H__36 #define _ Invader_H__35 #ifndef _SOB_H__ 36 #define _SOB_H__ 37 37 38 #include "invader/InvaderPrereqs.h" 38 #include "superorxobros/SOBPrereqs.h" 39 40 #include "tools/Timer.h" 39 41 40 42 #include "gametypes/Deathmatch.h" 41 #include " tools/Timer.h"43 #include "SOBCenterpoint.h" 42 44 43 45 namespace orxonox 44 46 { 45 47 46 class _InvaderExport Invader : public Deathmatch 48 49 class _SOBExport SOB : public Deathmatch 47 50 { 48 51 public: 49 Invader(Context* context); 52 SOB(Context* context); //!< Constructor. Registers and initializes the object. 53 virtual ~SOB(); //!< Destructor. Cleans up, if initialized. 50 54 51 virtual void start() override; 52 virtual void end() override; 53 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command 55 56 void setCenterpoint(SOBCenterpoint* center) 57 { this->center_ = center; } 58 void setFigureTemplate(const std::string& newTemplate) 59 { this->figureTemplate_ = newTemplate; } 60 61 const std::string& getFigureTemplate() const 62 { return this->figureTemplate_; } 63 64 65 protected: 66 54 67 55 void spawnEnemy(); 56 57 void setCenterpoint(InvaderCenterPoint* center); 58 59 int getLives(){return this->lives;} 60 int getLevel(){return this->level;} 61 int getPoints(){return this->point;} 62 int getMultiplier(){return this->multiplier;} 63 64 void costLife(); 65 void levelUp(); 66 void addPoints(int numPoints); 67 // checks if multiplier should be reset. 68 void comboControll(); 69 int lives; 70 int multiplier; 71 bool bEndGame; 72 bool bShowLevel; 73 private: 74 void toggleShowLevel(){bShowLevel = !bShowLevel;} 75 InvaderShip* getPlayer(); 76 WeakPtr<InvaderCenterPoint> center_; 77 WeakPtr<InvaderShip> player; 78 79 Timer enemySpawnTimer; 80 Timer comboTimer; 81 Timer showLevelTimer; 82 //Context* context; 83 int level; 84 int point; 85 bool b_combo; 68 void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats. 69 WeakPtr<SOBCenterpoint> center_; 70 WeakPtr<SOBFigure> figure_; 71 WeakPtr<Camera> camera; 72 86 73 }; 87 74 } 88 75 89 #endif /* _ Invader_H__ */76 #endif /* _Pong_H__ */
Note: See TracChangeset
for help on using the changeset viewer.