Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2014, 4:06:09 PM (9 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickupsFS14/src/modules/jump/Jump.h

    r10074 r10111  
    2727 */
    2828
    29 /**
    30     @file Jump.h
    31     @brief Declaration of the Jump class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _Jump_H__
    3630#define _Jump_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "tools/Timer.h"
    4134#include "graphics/Camera.h"
    42 
    4335#include "gametypes/Deathmatch.h"
    4436#include "JumpCenterpoint.h"
    45 
    4637#include <list>
    4738
    4839namespace orxonox
    4940{
    50 
    51     /**
    52     @brief
    53         Implements a Jump minigame (<a href="http://en.wikipedia.org/wiki/Jump">Wikipedia::Jump</a>).
    54         It connects the different entities present in a game of Jump.
    55 
    56         - The @ref orxonox::JumpCenterpoint "JumpCenterpoint" is the playing field for the Jump 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::JumpFigure "JumpFigures". The playing field is always in the x,y-plane, the x-axis being the horizontal and the z-axis being the vertical axis.<br />
    57         The Jump class redistributes the important parameters defined in @ref orxonox::JumpCenterpoint "JumpCenterpoint" to the other entities, that need to know them, e.g. the @ref orxonox::JumpPlatform "JumpPlatform" and the @ref orxonox::JumpFigure "JumpFigures".<br />
    58         The @ref orxonox::JumpCenterpoint "JumpCenterpoint" needs to exist in a level with the @ref orxonox::Gametype "Gametype" <em>Jump</em>.
    59         - The @ref orxonox::JumpPlatform "JumpPlatform" is the ball both players play with. The @ref orxonox::JumpPlatform "JumpPlatform" 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::JumpFigure "JumpFigures") of the ball and the effects of the failure of a player to catch the ball (i.e. the scoring of the other player).
    60         - The two @ref orxonox::JumpFigure "JumpFigures" are the entities through which the players can actively participate in the game, by controlling them. The @ref orxonox::JumpFigure "JumpFigure" class manages the movement (and restrictions thereof) and the influence of the players on the bats.
    61 
    62     @author
    63         Fabian 'x3n' Landau
    64 
    65     @ingroup Jump
    66     */
    6741    class _JumpExport Jump : public Deathmatch
    6842    {
    6943        public:
    70             Jump(Context* context); //!< Constructor. Registers and initializes the object.
    71             virtual ~Jump(); //!< Destructor. Cleans up, if initialized.
    72 
     44            Jump(Context* context);
     45            virtual ~Jump();
    7346            virtual void tick(float dt);
    74 
    75             virtual void start(); //!< Starts the Jump minigame.
    76             virtual void end(); ///!< Ends the Jump minigame.
    77 
    78             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
    79 
    80             virtual void playerScored(PlayerInfo* player, int score = 1); //!< Is called when the player scored.
    81 
     47            virtual void start();
     48            virtual void end();
     49            virtual void spawnPlayer(PlayerInfo* player);
    8250            int getScore(PlayerInfo* player) const;
    8351            bool getDead(PlayerInfo* player) const;
    84 
    85             /**
    86             @brief Set the JumpCenterpoint (the playing field).
    87             @param center A pointer to the JumpCenterpoint to be set.
    88             */
    8952            void setCenterpoint(JumpCenterpoint* center)
    9053                { center_ = center; }
    91             void setConfigValues(); //!< Makes scoreLimit configurable.
    92 
    93             PlayerInfo* getPlayer() const; //!< Get the left player.
     54            PlayerInfo* getPlayer() const;
    9455
    9556        protected:
    96             void startBall(); //!< Starts the ball with some default speed.
    97             void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats.
    98 
     57            void cleanup();
    9958            virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition);
    100 
    10159            virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition);
    10260            virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed);
     
    11775            virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
    11876            virtual void addShield(JumpPlatform* platform);
    119 
    12077            virtual void addStartSection();
    12178            virtual void addSection();
    12279            virtual bool addAdventure(int number);
    123 
    12480            virtual float randomXPosition();
    12581            virtual float randomXPosition(int totalColumns, int culomn);
     
    12985            virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd);
    13086            virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd);
    131 
    13287            virtual float randomPosition(float lowerBoundary, float upperBoundary);
    13388            virtual float randomSpeed();
    13489
    135             WeakPtr<JumpCenterpoint> center_; //!< The playing field.
    136             WeakPtr<JumpFigure> figure_; //!< The two bats.
     90            WeakPtr<JumpCenterpoint> center_;
     91            WeakPtr<JumpFigure> figure_;
    13792            WeakPtr<Camera> camera;
    138             int scoreLimit_; //!< If a player scored that much points, the game is ended.
    139 
    140             float totalScreenShift;
    141             float screenShiftSinceLastUpdate;
     93            float totalScreenShift_;
     94            float screenShiftSinceLastUpdate_;
    14295            int sectionNumber_;
    14396            int adventureNumber_;
Note: See TracChangeset for help on using the changeset viewer.