getType added for physics object
authorekku
Mon, 08 Dec 2008 15:59:33 +0000
changeset 287 f59c8dee7f91
parent 286 2a8f20a53ff2
child 288 47a5d7896aec
getType added for physics object
src/PhysicsObject.cc
src/PhysicsObject.hh
--- a/src/PhysicsObject.cc	Mon Dec 08 15:41:48 2008 +0000
+++ b/src/PhysicsObject.cc	Mon Dec 08 15:59:33 2008 +0000
@@ -322,6 +322,10 @@
     //Engine::log(DEBUG, "PhysicsObject.changeAim") << "Player aim: " << this->aim;
 }
 
+ObjectType PhysicsObject::getType (void) const {
+    return this->type;
+}
+
 void PhysicsObject::setFacing (FacingDirection facing) {
     this->facing = facing;
 }
--- a/src/PhysicsObject.hh	Mon Dec 08 15:41:48 2008 +0000
+++ b/src/PhysicsObject.hh	Mon Dec 08 15:59:33 2008 +0000
@@ -165,6 +165,11 @@
 
 public:
     /**
+     * Return the type of the physics object (player, projectile...)
+     */
+    ObjectType getType (void) const;
+
+    /**
      * Checks if it is possible for the object to be in the given
      * location.
      */