[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: |
---|
| 23 | * Fabian 'x3n' Landau |
---|
| 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; |
---|
| 51 | bool getDead(PlayerInfo* player) const; |
---|
| 52 | void setCenterpoint(JumpCenterpoint* center) |
---|
| 53 | { center_ = center; } |
---|
| 54 | PlayerInfo* getPlayer() const; |
---|
| 55 | |
---|
| 56 | protected: |
---|
| 57 | void cleanup(); |
---|
| 58 | virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition); |
---|
| 59 | virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition); |
---|
| 60 | virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed); |
---|
| 61 | virtual JumpPlatformVMove* addPlatformVMove(float xPosition, float zPosition, float lowerBoundary, float upperBoundary, float speed); |
---|
| 62 | virtual JumpPlatformDisappear* addPlatformDisappear(float xPosition, float zPosition); |
---|
| 63 | virtual JumpPlatformTimer* addPlatformTimer(float xPosition, float zPosition, float time, float variance); |
---|
| 64 | virtual JumpPlatformFake* addPlatformFake(float xPosition, float zPosition); |
---|
| 65 | virtual void addProjectile(float xPosition, float zPosition); |
---|
| 66 | virtual void addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 67 | virtual void addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 68 | virtual void addSpring(JumpPlatform* platform); |
---|
| 69 | virtual void addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 70 | virtual void addRocket(JumpPlatform* platform); |
---|
| 71 | virtual void addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 72 | virtual void addPropeller(JumpPlatform* platform); |
---|
| 73 | virtual void addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 74 | virtual void addBoots(JumpPlatform* platform); |
---|
| 75 | virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity); |
---|
| 76 | virtual void addShield(JumpPlatform* platform); |
---|
| 77 | virtual void addStartSection(); |
---|
| 78 | virtual void addSection(); |
---|
| 79 | virtual bool addAdventure(int number); |
---|
| 80 | virtual float randomXPosition(); |
---|
| 81 | virtual float randomXPosition(int totalColumns, int culomn); |
---|
| 82 | virtual float randomXPositionLeft(int totalColumns, int culomn); |
---|
| 83 | virtual float randomXPositionRight(int totalColumns, int culomn); |
---|
| 84 | virtual float randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 85 | virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 86 | virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd); |
---|
| 87 | virtual float randomPosition(float lowerBoundary, float upperBoundary); |
---|
| 88 | virtual float randomSpeed(); |
---|
| 89 | |
---|
| 90 | WeakPtr<JumpCenterpoint> center_; |
---|
| 91 | WeakPtr<JumpFigure> figure_; |
---|
| 92 | WeakPtr<Camera> camera; |
---|
| 93 | float totalScreenShift_; |
---|
| 94 | float screenShiftSinceLastUpdate_; |
---|
| 95 | int sectionNumber_; |
---|
| 96 | int adventureNumber_; |
---|
| 97 | float platformWidth_; |
---|
| 98 | float platformHeight_; |
---|
| 99 | }; |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | #endif /* _Jump_H__ */ |
---|