[12177] | 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 | * Julien Kindle |
---|
| 24 | * Co-authors: |
---|
| 25 | * |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef _SOBFigure_H__ |
---|
| 30 | #define _SOBFigure_H__ |
---|
| 31 | |
---|
| 32 | #include "superorxobros/SOBPrereqs.h" |
---|
| 33 | #include "worldentities/ControllableEntity.h" |
---|
| 34 | #include "SOBTube.h" |
---|
| 35 | #include "SOBCactus.h" |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | namespace orxonox |
---|
| 39 | { |
---|
| 40 | class _SOBExport SOBFigure : public ControllableEntity |
---|
| 41 | { |
---|
| 42 | public: |
---|
| 43 | SOBFigure(Context* context); //!< Constructor. Registers and initializes the object. |
---|
| 44 | virtual ~SOBFigure() {} |
---|
| 45 | virtual void tick(float dt) override; |
---|
| 46 | virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down. |
---|
| 47 | virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down. |
---|
| 48 | virtual void boost(bool boost) override; |
---|
| 49 | virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; |
---|
| 50 | void changeClothes(); |
---|
| 51 | void spawnFireball(); |
---|
| 52 | void die(); |
---|
| 53 | |
---|
| 54 | bool dead_; |
---|
| 55 | bool predead_; |
---|
| 56 | bool lvlEnded_; |
---|
| 57 | |
---|
| 58 | private: |
---|
| 59 | |
---|
| 60 | //Soooo many declarations |
---|
| 61 | bool fireallowed_; |
---|
| 62 | SOBTube* tube; //class SOBTube* used because tube needs to be global using in collides against function and tick function in SOBfigure.cc |
---|
| 63 | SOBCactus* cactus; |
---|
| 64 | bool moveUpPressed_; |
---|
| 65 | int kkk; |
---|
| 66 | |
---|
| 67 | bool tcol_; //used for getting through tube |
---|
| 68 | bool tubing; //used for getting through tube |
---|
| 69 | bool moveDownPressed_; |
---|
| 70 | bool moveLeftPressed_; |
---|
| 71 | bool moveRightPressed_; |
---|
| 72 | bool firePressed_; |
---|
| 73 | float gravityAcceleration_; |
---|
| 74 | float timeSinceLastFire_; |
---|
| 75 | float lastSpeed_z; |
---|
| 76 | float firecooldown_; |
---|
| 77 | float positiontube_; |
---|
| 78 | bool isColliding_; |
---|
| 79 | WorldEntity* particlespawner_; |
---|
| 80 | int PowerUpCounter_; |
---|
| 81 | int maxPowerUp_; |
---|
| 82 | int FireballPower; |
---|
| 83 | int sgn(float x); |
---|
| 84 | int reachedLvlEndState_; |
---|
| 85 | float timeCounter_; |
---|
| 86 | float collDisZ_; |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | }; |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | #endif /* _SOBFigure_H__ */ |
---|