- Timestamp:
- Nov 12, 2014, 3:58:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.h
r10117 r10118 38 38 #include "dodgerace2/DodgeRacePrereqs.h" 39 39 40 #include "core/CoreIncludes.h" 41 #include "core/XMLPort.h" 40 42 #include "worldentities/pawns/SpaceShip.h" 41 43 #include "graphics/Camera.h" 42 44 #include "weapons/projectiles/Projectile.h" 43 //#include "DodgeRace.h" 45 46 #include "DodgeRace.h" // Is necessary for getGame function 44 47 //#include "DodgeRaceCenterPoint.h" 45 48 46 49 namespace orxonox 47 50 { 48 class DodgeRaceShip : public SpaceShip51 class _DodgeRaceExport DodgeRaceShip : public SpaceShip 49 52 { 50 53 public: … … 54 57 55 58 // overwrite for 2d movement 56 57 59 virtual void moveFrontBack(const Vector2& value); 60 virtual void moveRightLeft(const Vector2& value); 58 61 59 60 62 // Starts or stops fireing 63 virtual void boost(bool bBoost); 61 64 62 //no rotation! 63 virtual void rotateYaw(const Vector2& value){}; 64 virtual void rotatePitch(const Vector2& value){}; 65 //return to main menu if game has ended. 66 virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();}; 65 //no rotation! 66 virtual void rotateYaw(const Vector2& value){}; 67 virtual void rotatePitch(const Vector2& value){}; 67 68 68 virtual void updateLevel(); 69 //return to main menu if game has ended. 70 virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();}; 71 72 virtual void updateLevel(); 73 74 float speed, damping, posforeward; 75 bool isFireing; 76 77 private: 78 WeakPtr<DodgeRace> getGame(); 79 WeakPtr<DodgeRace> game; 80 Camera* camera; 81 float lastTimeFront, lastTimeLeft, lastTime; 82 struct Velocity 83 { 84 float x; 85 float y; 86 } velocity, desiredVelocity; 87 88 89 90 91 /* 92 69 93 70 94 //virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); … … 74 98 75 99 private: 76 WeakPtr<DodgeRace> getGame(); 77 WeakPtr<DodgeRace> game; 78 Camera* camera; 79 bool isFireing; 80 float speed, damping, posforeward; 81 float lastTimeFront, lastTimeLeft, lastTime; 82 struct Velocity 83 { 84 float x; 85 float y; 86 } velocity, desiredVelocity; 100 101 102 103 104 105 87 106 88 107 // WeakPtr<DodgeRaceEnemy> lastEnemy; 89 WeakPtr<Projectile> lastShot; 108 WeakPtr<Projectile> lastShot;*/ 90 109 91 110 };
Note: See TracChangeset
for help on using the changeset viewer.