#ifndef _OrxoBlox_H__ #define _OrxoBlox_H__ #include "OrxoBlox/OrxoBloxPrereqs.h" #include "tools/Timer.h" #include "gametypes/Deathmatch.h" #include "OrxoBloxCenterpoint.h" #include "OrxoBloxWall.h" #include "OrxoBloxShip.h" namespace orxonox { /** @brief Implements a OrxoBlox minigame (Wikipedia::OrxoBlox). It connects the different entities present in a game of OrxoBlox. - The @ref orxonox::OrxoBloxCenterpoint "OrxoBloxCenterpoint" is the playing field for the OrxoBlox minigame, it allows for configuration of the minigame, e.g. by setting the size of the playing field, or the length of the @ref orxonox::OrxoBloxBat "OrxoBloxBats". The playing field is always in the x,y-plane, the x-axis being the horizontal and the z-axis being the vertical axis.
The OrxoBlox class redistributes the important parameters defined in @ref orxonox::OrxoBloxCenterpoint "OrxoBloxCenterpoint" to the other entities, that need to know them, e.g. the @ref orxonox::OrxoBloxBall "OrxoBloxBall" and the @ref orxonox::OrxoBloxBat "OrxoBloxBats".
The @ref orxonox::OrxoBloxCenterpoint "OrxoBloxCenterpoint" needs to exist in a level with the @ref orxonox::Gametype "Gametype" OrxoBlox. - The @ref orxonox::OrxoBloxBall "OrxoBloxBall" is the ball both players play with. The @ref orxonox::OrxoBloxBall "OrxoBloxBall" both implements the movement of the ball, as well as the influence of the boundaries and consequently, also the bouncing (off the upper and lower delimiters, and as off the @ref orxonox::OrxoBloxBat "OrxoBloxBats") of the ball and the effects of the failure of a player to catch the ball (i.e. the scoring of the other player). - The two @ref orxonox::OrxoBloxBat "OrxoBloxBats" are the entities through which the players can actively participate in the game, by controlling them. The @ref orxonox::OrxoBloxBat "OrxoBloxBat" class manages the movement (and restrictions thereof) and the influence of the players on the bats. @author Fabian 'x3n' Landau @ingroup OrxoBlox */ class _OrxoBloxExport OrxoBlox : public Deathmatch { public: OrxoBlox(Context* context); //!< Constructor. Registers and initializes the object. virtual ~OrxoBlox(); //!< Destructor. Cleans up, if initialized. virtual void start() override; //!< Starts the OrxoBlox minigame. virtual void end() override; ///!< Ends the OrxoBlox minigame. PlayerInfo* getPlayer(); virtual void playerPreSpawn(PlayerInfo* player) override; virtual void tick(float dt) override; void LevelUp(); /** @brief Set the OrxoBloxCenterpoint (the playing field). @param center A pointer to the OrxoBloxCenterpoint to be set. */ void setCenterpoint(OrxoBloxCenterpoint* center) { this->center_ = center; } OrxoBloxCenterpoint* getCenterpoint(void) { return this->center_; } virtual void addBots(unsigned int amount) override{} // center_; //!< The playing field. unsigned int level_; WeakPtr playership; PlayerInfo* player_; Timer starttimer_; //!< A timer to delay the start of the game. WeakPtr futureWall_; int counter; const int max_counter = 4; }; } #endif /* _OrxoBlox_H__ */