Changeset 9868 for code/branches/invaders/src/modules/invader/InvaderShip.h
- Timestamp:
- Dec 3, 2013, 8:18:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/invaders/src/modules/invader/InvaderShip.h
r9829 r9868 45 45 { 46 46 public: 47 InvaderShip(Context* context); //!< Constructor. Registers and initializes the object. 48 virtual ~InvaderShip() {} 47 InvaderShip(Context* context); 49 48 50 49 virtual void tick(float dt); 51 50 51 // overwrite for 2d movement 52 52 virtual void moveFrontBack(const Vector2& value); 53 53 virtual void moveRightLeft(const Vector2& value); 54 54 55 virtual void boost(bool bBoost); // Starts or stops fireing 55 // Starts or stops fireing 56 virtual void boost(bool bBoost); 56 57 57 58 //no rotation! 58 59 virtual void rotateYaw(const Vector2& value){}; 59 60 virtual void rotatePitch(const Vector2& value){}; 60 virtual void rotateRoll(const Vector2& value){}; 61 //return to main menu if game has ended. 62 virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();}; 61 63 62 64 virtual void updateLevel(); 63 65 64 // *InvaderShip getShip(){return this;}65 66 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 66 67 private: 67 68 68 WeakPtr<Invader> getGame(); 69 69 WeakPtr<Invader> game;
Note: See TracChangeset
for help on using the changeset viewer.