supertux
Public Member Functions | List of all members
Portable Class Referenceabstract

An object that inherits from this object is considered "portable" and can be carried around by the player. More...

#include <portable.hpp>

Inheritance diagram for Portable:
GameObjectComponent Bomb GoldBomb MrBomb MrIceBlock Rock SkyDive Snail SmartBlock Lantern RustyTrampoline Trampoline

Public Member Functions

virtual void grab (MovingObject &other, const Vector &pos, Direction dir)=0
 called each frame when the object has been grabbed. More...
 
virtual void ungrab (MovingObject &other, Direction)
 
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?
 

Detailed Description

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)

Member Function Documentation

§ grab()

virtual void Portable::grab ( MovingObject other,
const Vector pos,
Direction  dir 
)
pure virtual

called each frame when the object has been grabbed.

Implemented in Snail, Bomb, GoldBomb, Rock, MrIceBlock, MrBomb, RustyTrampoline, SkyDive, Lantern, and Trampoline.


The documentation for this class was generated from the following file: