Last change
on this file since 3303 was
3280,
checked in by dave, 20 years ago
|
branches/old.dave: Nochmal das gleiche, Raumschiff sollte drehen, aber nur 20°
|
File size:
1.1 KB
|
Rev | Line | |
---|
[3280] | 1 | /*! |
---|
| 2 | \file player.h |
---|
| 3 | \brief Implements a basic controllable WorldEntity |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef PLAYER_H |
---|
| 7 | #define PLAYER_H |
---|
| 8 | |
---|
| 9 | #include "world_entity.h" |
---|
| 10 | #include "object.h" |
---|
| 11 | #include <math.h> |
---|
| 12 | |
---|
| 13 | //! Basic controllable WorldEntity |
---|
| 14 | class Player : public WorldEntity |
---|
| 15 | { |
---|
| 16 | friend class World; |
---|
| 17 | |
---|
| 18 | public: |
---|
| 19 | Player (bool isFree = false); |
---|
| 20 | ~Player (); |
---|
| 21 | |
---|
| 22 | virtual void post_spawn (); |
---|
| 23 | virtual void tick (float time); |
---|
| 24 | virtual void hit (WorldEntity* weapon, Vector loc); |
---|
| 25 | virtual void destroy (); |
---|
| 26 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); |
---|
| 27 | virtual void command (Command* cmd); |
---|
| 28 | |
---|
| 29 | virtual void draw (); |
---|
| 30 | virtual void get_lookat (Location* locbuf); |
---|
| 31 | |
---|
| 32 | virtual void left_world (); |
---|
| 33 | |
---|
| 34 | private: |
---|
| 35 | bool bUp, bDown, bLeft, bRight, bAscend, bDescend; |
---|
| 36 | bool bFire; |
---|
| 37 | Vector velocity; |
---|
| 38 | float travel_speed; |
---|
| 39 | float acceleration; |
---|
| 40 | GLuint objectList; |
---|
| 41 | Object* obj; |
---|
| 42 | float tottime; |
---|
| 43 | float tottimecopy; |
---|
| 44 | float rottime; |
---|
| 45 | float angle; |
---|
| 46 | bool angleturn; |
---|
| 47 | bool movfinishright,movfinishleft,movfinishup,movfinishdown; |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | void move (float time); |
---|
| 52 | |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.