Last change
on this file since 3688 was
3401,
checked in by dave, 20 years ago
|
branches/dave/src:Ok, diesmal ist die Rotation besser gelungen, schoener programmiert und vor allem nur im player.cc und player.h
|
File size:
1.0 KB
|
Line | |
---|
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 | |
---|
11 | class Model; |
---|
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 postSpawn(); |
---|
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 getLookat(Location* locbuf); |
---|
31 | |
---|
32 | virtual void leftWorld(); |
---|
33 | |
---|
34 | |
---|
35 | private: |
---|
36 | bool bUp, bDown, bLeft, bRight, bAscend, bDescend; |
---|
37 | bool bFire; |
---|
38 | |
---|
39 | Vector velocity; |
---|
40 | Vector accelSlip; |
---|
41 | Vector accelSlipDirection; |
---|
42 | float travelSpeed; |
---|
43 | float acceleration; |
---|
44 | float angle; |
---|
45 | GLuint objectList; |
---|
46 | |
---|
47 | void move(float time); |
---|
48 | void rotate(float time); |
---|
49 | void backRotate(float time); |
---|
50 | Vector slip (float time,Vector accel); |
---|
51 | }; |
---|
52 | |
---|
53 | #endif /* _PLAYER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.