ce678d10ddc797270b8178f07e82dfce655568eb
[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     /**
18      * called each frame when the object has been grabbed.
19      */
20   virtual void grab(MovingObject& object, const Vector& pos) = 0;
21 };
22
23 #endif