Major rewrite of scripting support:
[supertux.git] / src / object / portable.hpp
index 5b74e1d..265f0a0 100644 (file)
@@ -21,6 +21,7 @@
 #define __PORTABLE_H__
 
 #include "moving_object.hpp"
+#include "direction.hpp"
 
 /**
  * An object that inherits from this object is considered "portable" and can
@@ -37,13 +38,10 @@ public:
   /**
    * called each frame when the object has been grabbed.
    */
-  virtual void grab(MovingObject& object, const Vector& pos) = 0;
+  virtual void grab(MovingObject& object, const Vector& pos, Direction dir) = 0;
 
-  /** called when object isn't grabbed anymore */
-  virtual void ungrab(MovingObject& object)
-  {
-    (void) object;
-  }
+  virtual void ungrab(MovingObject& , Direction )
+  {}
 };
 
 #endif