[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 "gametypes/Deathmatch.h" |
---|
| 34 | |
---|
| 35 | namespace orxonox |
---|
| 36 | { |
---|
| 37 | class _JumpExport Jump : public Deathmatch |
---|
| 38 | { |
---|
| 39 | public: |
---|
| 40 | Jump(Context* context); |
---|
| 41 | virtual ~Jump(); |
---|
[10817] | 42 | virtual void tick(float dt) override; |
---|
| 43 | virtual void start() override; |
---|
| 44 | virtual void end() override; |
---|
| 45 | virtual void spawnPlayer(PlayerInfo* player) override; |
---|
[10078] | 46 | int getScore(PlayerInfo* player) const; |
---|
[10260] | 47 | float getFuel() const; |
---|
[10078] | 48 | bool getDead(PlayerInfo* player) const; |
---|
[10733] | 49 | void setCenterpoint(JumpCenterpoint* center); |
---|
[10078] | 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 | |
---|
| 86 | WeakPtr<JumpCenterpoint> center_; |
---|
| 87 | WeakPtr<JumpFigure> figure_; |
---|
| 88 | WeakPtr<Camera> camera; |
---|
| 89 | float totalScreenShift_; |
---|
| 90 | float screenShiftSinceLastUpdate_; |
---|
| 91 | int sectionNumber_; |
---|
| 92 | int adventureNumber_; |
---|
| 93 | float platformWidth_; |
---|
| 94 | float platformHeight_; |
---|
| 95 | }; |
---|
| 96 | } |
---|
| 97 | |
---|
| 98 | #endif /* _Jump_H__ */ |
---|