equal
deleted
inserted
replaced
2 #define PROJECTILE_HH |
2 #define PROJECTILE_HH |
3 |
3 |
4 class Projectile; |
4 class Projectile; |
5 |
5 |
6 #include "GameState.hh" |
6 #include "GameState.hh" |
|
7 #include "Player.hh" |
7 #include "PhysicsObject.hh" |
8 #include "PhysicsObject.hh" |
8 #include "Timer.hh" |
9 #include "Timer.hh" |
|
10 #include "Types.hh" |
9 #include "GraphicsPointer.hh" |
11 #include "GraphicsPointer.hh" |
10 |
12 |
11 /** |
13 /** |
12 * A projectile is a flying PhysicsObject, created by firing a player's weapon. It has an initial velocity, is |
14 * A projectile is a flying PhysicsObject, created by firing a player's weapon. It has an initial velocity, is |
13 * represented as a diamond-shape with the given "radius", can explode or bounce on collisions, expires at some point, |
15 * represented as a diamond-shape with the given "radius", can explode or bounce on collisions, expires at some point, |
67 * Removes ground at given position if applicable, and destroys this PhysicsObject. |
69 * Removes ground at given position if applicable, and destroys this PhysicsObject. |
68 * |
70 * |
69 * This is overriden by Network. |
71 * This is overriden by Network. |
70 */ |
72 */ |
71 virtual void onDestroy (Vector position, bool removeGround); |
73 virtual void onDestroy (Vector position, bool removeGround); |
|
74 |
|
75 /** |
|
76 * This Projectile has hit the given player. |
|
77 * |
|
78 * This Projectile inflicts a certain amount of damage on the player. We are not destroyed, this can be called |
|
79 * multiple times... |
|
80 */ |
|
81 virtual void onHitPlayer (Player *player, Health damage); |
72 |
82 |
73 /** |
83 /** |
74 * Call onDestroy, removingGround |
84 * Call onDestroy, removingGround |
75 */ |
85 */ |
76 virtual void onCollision (Vector collisionPoint, PhysicsObject *other); |
86 virtual void onCollision (Vector collisionPoint, PhysicsObject *other); |