[10078] | 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: |
---|
[10260] | 23 | * Fabien Vultier |
---|
[10078] | 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _Jump_H__ |
---|
| 30 | #define _Jump_H__ |
---|
| 31 | |
---|
| 32 | #include "jump/JumpPrereqs.h" |
---|
| 33 | #include "tools/Timer.h" |
---|
| 34 | #include "graphics/Camera.h" |
---|
| 35 | #include "gametypes/Deathmatch.h" |
---|
| 36 | #include "JumpCenterpoint.h" |
---|
| 37 | #include <list> |
---|
| 38 | |
---|
| 39 | namespace orxonox |
---|
| 40 | { |
---|
| 41 | class _JumpExport Jump : public Deathmatch |
---|
| 42 | { |
---|
| 43 | public: |
---|
| 44 | Jump(Context* context); |
---|
| 45 | virtual ~Jump(); |
---|
| 46 | virtual void tick(float dt); |
---|
| 47 | virtual void start(); |
---|
| 48 | virtual void end(); |
---|
| 49 | virtual void spawnPlayer(PlayerInfo* player); |
---|
| 50 | int getScore(PlayerInfo* player) const; |
---|
[10260] | 51 | float getFuel() const; |
---|
[10078] | 52 | bool getDead(PlayerInfo* player) const; |
---|
| 53 | void setCenterpoint(JumpCenterpoint* center) |
---|
| 54 | { center_ = center; } |
---|
| 55 | PlayerInfo* getPlayer() const; |
---|
| 56 | |
---|
| 57 | protected: |
---|
| 58 | void cleanup(); |
---|
| 59 | virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition); |
---|
| 60 | virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition); |
---|
| 61 | virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed); |
---|
| 62 | virtual JumpPlatformVMove* addPlatformVMove(float xPosition, float zPosition, float lowerBoundary, float upperBoundary, float speed); |
---|
| 63 | virtual JumpPlatformDisappear* addPlatformDisappear(float xPosition, float zPosition); |
---|
| 64 | virtual JumpPlatformTimer* addPlatformTimer(float xPosition, float zPosition, float time, float variance); |
---|
| 65 | virtual JumpPlatformFake* addPlatformFake(float xPosition, float zPosition); |
---|
| 66 | virtual void addProjectile(float xPosition, float zPosition); |
---|
| 67 | virtual void addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 68 | virtual void addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 69 | virtual void addSpring(JumpPlatform* platform); |
---|
| 70 | virtual void addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 71 | virtual void addRocket(JumpPlatform* platform); |
---|
| 72 | virtual void addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 73 | virtual void addPropeller(JumpPlatform* platform); |
---|
| 74 | virtual void addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 75 | virtual void addBoots(JumpPlatform* platform); |
---|
| 76 | virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 77 | virtual void addShield(JumpPlatform* platform); |
---|
| 78 | virtual void addStartSection(); |
---|
| 79 | virtual void addSection(); |
---|
| 80 | virtual bool addAdventure(int number); |
---|
| 81 | virtual float randomXPosition(); |
---|
| 82 | virtual float randomXPosition(int totalColumns, int culomn); |
---|
| 83 | virtual float randomXPositionLeft(int totalColumns, int culomn); |
---|
| 84 | virtual float randomXPositionRight(int totalColumns, int culomn); |
---|
| 85 | virtual float randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 86 | virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 87 | virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 88 | virtual float randomPosition(float lowerBoundary, float upperBoundary); |
---|
| 89 | virtual float randomSpeed(); |
---|
| 90 | |
---|
| 91 | WeakPtr<JumpCenterpoint> center_; |
---|
| 92 | WeakPtr<JumpFigure> figure_; |
---|
| 93 | WeakPtr<Camera> camera; |
---|
| 94 | float totalScreenShift_; |
---|
| 95 | float screenShiftSinceLastUpdate_; |
---|
| 96 | int sectionNumber_; |
---|
| 97 | int adventureNumber_; |
---|
| 98 | float platformWidth_; |
---|
| 99 | float platformHeight_; |
---|
| 100 | }; |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | #endif /* _Jump_H__ */ |
---|