Last change
on this file since 3280 was
3279,
checked in by dave, 20 years ago
|
branches/old.dave: Die Neigung des Raumschiffes ist jetzt nicht mehr so stark, und jetzt kann man auch 2 Tasten aufs mal drücken, ohne dass das Raumschiffsche jedes mal anhält:)
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2190] | 1 | /*! |
---|
| 2 | \file player.h |
---|
| 3 | \brief Implements a basic controllable WorldEntity |
---|
| 4 | */ |
---|
[1853] | 5 | |
---|
| 6 | #ifndef PLAYER_H |
---|
| 7 | #define PLAYER_H |
---|
| 8 | |
---|
[2036] | 9 | #include "world_entity.h" |
---|
[2860] | 10 | #include "object.h" |
---|
[3155] | 11 | #include <math.h> |
---|
[1853] | 12 | |
---|
[2190] | 13 | //! Basic controllable WorldEntity |
---|
[2036] | 14 | class Player : public WorldEntity |
---|
| 15 | { |
---|
[2551] | 16 | friend class World; |
---|
| 17 | |
---|
[1853] | 18 | public: |
---|
[2190] | 19 | Player (bool isFree = false); |
---|
[1853] | 20 | ~Player (); |
---|
[2551] | 21 | |
---|
| 22 | virtual void post_spawn (); |
---|
[2190] | 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); |
---|
[2551] | 27 | virtual void command (Command* cmd); |
---|
[1900] | 28 | |
---|
[2190] | 29 | virtual void draw (); |
---|
| 30 | virtual void get_lookat (Location* locbuf); |
---|
[2551] | 31 | |
---|
| 32 | virtual void left_world (); |
---|
| 33 | |
---|
[1856] | 34 | private: |
---|
[2551] | 35 | bool bUp, bDown, bLeft, bRight, bAscend, bDescend; |
---|
| 36 | bool bFire; |
---|
| 37 | Vector velocity; |
---|
| 38 | float travel_speed; |
---|
| 39 | float acceleration; |
---|
[2730] | 40 | GLuint objectList; |
---|
[2860] | 41 | Object* obj; |
---|
[3155] | 42 | float tottime; |
---|
[3172] | 43 | float tottimecopy; |
---|
| 44 | float rottime; |
---|
| 45 | float angle; |
---|
[3279] | 46 | int numPressed; |
---|
[3172] | 47 | bool angleturn; |
---|
| 48 | bool movfinishright,movfinishleft,movfinishup,movfinishdown; |
---|
| 49 | |
---|
| 50 | |
---|
[2551] | 51 | |
---|
| 52 | void move (float time); |
---|
| 53 | |
---|
[1853] | 54 | }; |
---|
| 55 | |
---|
| 56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.