Orxonox  0.0.5 Codename: Arcturus
Jump.h
Go to the documentation of this file.
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  * Fabien Vultier
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _Jump_H__
30 #define _Jump_H__
31 
32 #include "jump/JumpPrereqs.h"
33 #include "gametypes/Deathmatch.h"
34 
35 namespace orxonox
36 {
37  class _JumpExport Jump : public Deathmatch
38  {
39  public:
40  Jump(Context* context);
41  virtual ~Jump();
42  virtual void tick(float dt) override;
43  virtual void start() override;
44  virtual void end() override;
45  virtual void spawnPlayer(PlayerInfo* player) override;
46  int getScore(PlayerInfo* player) const;
47  float getFuel() const;
48  bool getDead(PlayerInfo* player) const;
49  void setCenterpoint(JumpCenterpoint* center);
50  PlayerInfo* getPlayer() const;
51 
52  protected:
53  void cleanup();
54  virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition);
55  virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition);
56  virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed);
57  virtual JumpPlatformVMove* addPlatformVMove(float xPosition, float zPosition, float lowerBoundary, float upperBoundary, float speed);
58  virtual JumpPlatformDisappear* addPlatformDisappear(float xPosition, float zPosition);
59  virtual JumpPlatformTimer* addPlatformTimer(float xPosition, float zPosition, float time, float variance);
60  virtual JumpPlatformFake* addPlatformFake(float xPosition, float zPosition);
61  virtual void addProjectile(float xPosition, float zPosition);
62  virtual void addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
63  virtual void addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
64  virtual void addSpring(JumpPlatform* platform);
65  virtual void addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
66  virtual void addRocket(JumpPlatform* platform);
67  virtual void addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
68  virtual void addPropeller(JumpPlatform* platform);
69  virtual void addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
70  virtual void addBoots(JumpPlatform* platform);
71  virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
72  virtual void addShield(JumpPlatform* platform);
73  virtual void addStartSection();
74  virtual void addSection();
75  virtual bool addAdventure(int number);
76  virtual float randomXPosition();
77  virtual float randomXPosition(int totalColumns, int culomn);
78  virtual float randomXPositionLeft(int totalColumns, int culomn);
79  virtual float randomXPositionRight(int totalColumns, int culomn);
80  virtual float randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd);
81  virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd);
82  virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd);
83  virtual float randomPosition(float lowerBoundary, float upperBoundary);
84  virtual float randomSpeed();
85 
95  };
96 }
97 
98 #endif /* _Jump_H__ */
#define _JumpExport
Definition: JumpPrereqs.h:60
float platformWidth_
Definition: Jump.h:93
Definition: JumpPlatformDisappear.h:43
::std::string string
Definition: gtest-port.h:756
float screenShiftSinceLastUpdate_
Definition: Jump.h:90
Definition: JumpPlatformHMove.h:38
Definition: JumpPlatformTimer.h:43
Definition: JumpPlatformVMove.h:37
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
Shared library macros, enums, constants and forward declarations for the jump module ...
Definition: JumpPlatformStatic.h:37
WeakPtr< JumpCenterpoint > center_
Definition: Jump.h:86
int sectionNumber_
Definition: Jump.h:91
float totalScreenShift_
Definition: Jump.h:89
float platformHeight_
Definition: Jump.h:94
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: JumpPlatformFake.h:43
Definition: Context.h:45
Definition: Jump.h:37
WeakPtr< JumpFigure > figure_
Definition: Jump.h:87
WeakPtr< Camera > camera
Definition: Jump.h:88
int adventureNumber_
Definition: Jump.h:92
Definition: Deathmatch.h:37
Definition: JumpPlatform.h:43
Definition: PlayerInfo.h:39
The JumpCenterpoint is a StaticEntity which represents the level of the minigame. ...
Definition: JumpCenterpoint.h:42