equal
deleted
inserted
replaced
34 unsigned int selectedWeapon; |
34 unsigned int selectedWeapon; |
35 |
35 |
36 // we have a rope |
36 // we have a rope |
37 Rope rope; |
37 Rope rope; |
38 |
38 |
|
39 int health; |
|
40 |
39 // XXX: hmm... updated where? |
41 // XXX: hmm... updated where? |
40 int animation_step; |
42 int animation_step; |
41 |
43 |
42 /** |
44 /** |
43 * Default constructor for use with virtual inheritance... it's not defined, and must not be called |
45 * Default constructor for use with virtual inheritance... it's not defined, and must not be called |
52 /** |
54 /** |
53 * Remove player from state players list |
55 * Remove player from state players list |
54 */ |
56 */ |
55 ~Player (void); |
57 ~Player (void); |
56 |
58 |
57 /* |
59 /** |
58 * Used by the network code to execute various actions |
60 * Used by the network code to execute various actions |
59 */ |
61 */ |
60 virtual void handleDig (Vector position, float radius); |
62 virtual void handleDig (Vector position, float radius); |
61 virtual void handleFireWeapon (Weapon *weapon, Vector position, Vector velocity); |
63 virtual void handleFireWeapon (Weapon *weapon, Vector position, Vector velocity); |
62 virtual void handleChangeWeapon (unsigned int weaponIndex); |
64 virtual void handleChangeWeapon (unsigned int weaponIndex); |
83 * |
85 * |
84 * @return A pointer to a Weapon object if found, NULL otherwise |
86 * @return A pointer to a Weapon object if found, NULL otherwise |
85 */ |
87 */ |
86 Weapon* getWeapon (WeaponID id); |
88 Weapon* getWeapon (WeaponID id); |
87 |
89 |
88 /* |
90 /** |
89 * Prints random things via Engine::log |
91 * Prints random things via Engine::log |
90 */ |
92 */ |
91 void printDebugInfo (); |
93 void printDebugInfo (); |
92 |
94 |
93 /* |
95 /** |
94 * Overrides PhysicsObject::tick to also advance game state |
96 * Overrides PhysicsObject::tick to also advance game state |
95 */ |
97 */ |
96 virtual void tick (TimeMS dt); |
98 virtual void tick (TimeMS dt); |
|
99 |
|
100 /** |
|
101 * This is called when the player collides with the terrain or with some other object. |
|
102 */ |
|
103 void onCollision (Vector collisionPoint, PhysicsObject *other); |
97 |
104 |
98 /* |
105 /* |
99 * Drawing requires the skin texture, which is loaded on-demand when draw is called |
106 * Drawing requires the skin texture, which is loaded on-demand when draw is called |
100 */ |
107 */ |
101 static bool skin_loaded; |
108 static bool skin_loaded; |