supertux
Public Member Functions | Protected Attributes | List of all members
Portable Class Reference

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:
Inheritance graph
[legend]
Collaboration diagram for Portable:
Collaboration graph
[legend]

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 MovingObjectget_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

MovingObjectm_owner = nullptr
 

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 
)
inlinevirtual

called each frame when the object has been grabbed.

Reimplemented in BadGuy, Snail, MrBomb, MrIceBlock, SkyDive, Rock, RustyTrampoline, Lantern, and Trampoline.


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