added a bell object which is a new better way to do reset points
[supertux.git] / src / object / portable.h
1 #ifndef __PORTABLE_H__
2 #define __PORTABLE_H__
3
4 #include "special/moving_object.h"
5
6 using namespace SuperTux;
7
8 /**
9  * An object that inherits from this object is considered "portable" and can
10  * be carried around by the player.
11  * The object has to additionally set the PORTABLE flag (this allows to
12  * make the object only temporarily portable by resetting the flag)
13  */
14 class Portable
15 {
16 public:
17   virtual ~Portable()
18   { }
19   
20   /**
21    * called each frame when the object has been grabbed.
22    */
23   virtual void grab(MovingObject& object, const Vector& pos) = 0;
24
25   /** called when object isn't grabbed anymore */
26   virtual void ungrab(MovingObject& object)
27   {
28     (void) object;
29   }
30 };
31
32 #endif