supertux
|
An object that inherits from this object is considered "portable" and can be carried around by the player. More...
#include <portable.hpp>
Public Member Functions | |
virtual void | grab (MovingObject &other, const Vector &pos, Direction dir) |
called each frame when the object has been grabbed. More... | |
virtual void | ungrab (MovingObject &other, Direction) |
virtual MovingObject * | get_owner () const |
virtual bool | is_grabbed () const |
virtual bool | is_portable () const |
virtual bool | is_hampering () const |
Is the object so heavy/bulky/fragile that Tux can't run while carrying it? | |
Protected Attributes | |
MovingObject * | m_owner = nullptr |
An object that inherits from this object is considered "portable" and can be carried around by the player.
The object has to additionally set the PORTABLE flag (this allows to make the object only temporarily portable by resetting the flag)
|
inlinevirtual |
called each frame when the object has been grabbed.
Reimplemented in BadGuy, Snail, MrBomb, MrIceBlock, SkyDive, Rock, RustyTrampoline, Lantern, and Trampoline.