Changeset 2190 in orxonox.OLD for orxonox/trunk/src/player.h
- Timestamp:
- Jul 17, 2004, 12:11:20 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/player.h
r2036 r2190 1 /*! 2 \file player.h 3 \brief Implements a basic controllable WorldEntity 4 */ 1 5 2 6 #ifndef PLAYER_H … … 5 9 #include "world_entity.h" 6 10 7 class ShootLaser; 8 class ShootRocket; 9 10 11 //! Basic controllable WorldEntity 11 12 class Player : public WorldEntity 12 13 { 14 friend class World; 13 15 14 16 public: 15 Player ( );17 Player (bool isFree = false); 16 18 ~Player (); 17 19 18 /* position of the spacecraft */ 19 float xCor; 20 float yCor; 21 float zCor; 20 virtual void post_spawn (); 21 virtual void tick (float time); 22 virtual void hit (WorldEntity* weapon, Vector loc); 23 virtual void destroy (); 24 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 25 virtual void command (Command* cmd); 22 26 23 float collisionRadius; 27 virtual void draw (); 28 virtual void get_lookat (Location* locbuf); 24 29 25 26 /* this player wanna shoot? so include a ref to ShootLaser */ 27 ShootLaser* shootLaser; 28 ShootRocket* shootRocket; 29 30 void setPosition(float x, float y, float z); 31 void getPosition(float* x, float* y, float* z); 32 void setCollisionRadius(float radius); 33 void paint(); 34 void goX(float x); 35 void goY(float y); 36 void goZ(float x); 37 void shoot(int n); 38 // void addIO(InputOutput *io); 39 void drawPlayer(void); 30 virtual void left_world (); 40 31 41 32 private: 42 43 33 bool bUp, bDown, bLeft, bRight, bAscend, bDescend; 34 bool bFire; 35 Vector velocity; 36 float travel_speed; 37 float acceleration; 38 39 void move (float time); 40 44 41 }; 45 42
Note: See TracChangeset
for help on using the changeset viewer.