--- a/src/Player.hh Mon Dec 08 16:46:48 2008 +0000
+++ b/src/Player.hh Mon Dec 08 17:24:40 2008 +0000
@@ -11,6 +11,7 @@
#include "Input.hh"
#include "Rope.hh"
#include "GraphicsPointer.hh"
+#include "Types.hh"
#include <vector>
/**
@@ -35,8 +36,9 @@
// we have a rope
Rope rope;
-
- int health;
+
+ /** Our current health */
+ Health health;
// XXX: hmm... updated where?
int animation_step;
@@ -102,13 +104,20 @@
*/
void onCollision (Vector collisionPoint, PhysicsObject *other);
+ /**
+ * We have been hit by something, and therefore take some damage.
+ *
+ * XXX: should this take the Projectile instead or somesuch?
+ */
+ void takeDamage (Health damage);
+
/*
* Drawing requires the skin texture, which is loaded on-demand when draw is called
*/
static bool skin_loaded;
static CL_Surface skin_surface;
virtual void draw (Graphics *g, PixelCoordinate camera);
- void takeDamage(int damage);
+
};
/**