Changeset 5878 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h
- Timestamp:
- Dec 2, 2005, 6:07:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h
r5837 r5878 1 /*! 2 * @file space_ship.h 3 * Implements the Control of a Spaceship 4 */ 5 6 #ifndef _PLAYER_H 7 #define _PLAYER_H 8 9 #include "playable.h" 10 11 template<class T> class tList; 12 class Vector; 13 class Event; 14 15 class SpaceShip : public Playable 16 { 17 18 public: 19 20 SpaceShip(); 21 SpaceShip(const char* fileName); 22 SpaceShip(const TiXmlElement* root); 23 virtual ~SpaceShip(); 24 25 void init(); 26 void loadParams(const TiXmlElement* root); 27 28 void addWeapon(Weapon* weapon ); 29 void removeWeapon(Weapon* weapon); 30 31 virtual void postSpawn(); 32 virtual void leftWorld(); 33 34 virtual void collidesWith(WorldEntity* entity, const Vector& location); 35 virtual void tick(float time); 36 virtual void draw() const; 37 38 void process(const Event &event); 39 40 41 42 private: 43 44 void move(float time); 45 void weaponAction(); 46 47 // !! temporary !! 48 void ADDWEAPON(); 49 50 bool bUp; //!< up button pressed. 51 bool bDown; //!< down button pressed. 52 bool bLeft; //!< left button pressed. 53 bool bRight; //!< right button pressed. 54 bool bAscend; //!< ascend button pressed. 55 bool bDescend; //!< descend button presses. 56 bool bFire; //!< fire button pressed. 57 58 Vector velocity; //!< the velocity of the player. 59 float travelSpeed; //!< the current speed of the player (to make soft movement) 60 float acceleration; //!< the acceleration of the player. 61 62 }; 63 64 #endif /* _PLAYABLE_H */
Note: See TracChangeset
for help on using the changeset viewer.