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>

Inherited by Bomb, MrBomb, MrIceBlock, Rock, and SkyDive.

List of all members.

Public Member Functions

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

Definition at line 30 of file portable.hpp.


Constructor & Destructor Documentation

virtual Portable::~Portable (  )  [inline, virtual]

Definition at line 33 of file portable.hpp.

00034   { }


Member Function Documentation

virtual void Portable::grab ( MovingObject object,
const Vector pos,
Direction  dir 
) [pure virtual]

called each frame when the object has been grabbed.

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

Referenced by Owl::active_update(), and Player::position_grabbed_object().

virtual void Portable::ungrab ( MovingObject ,
Direction   
) [inline, virtual]

Reimplemented in Bomb, MrBomb, MrIceBlock, SkyDive, Lantern, Rock, and Trampoline.

Definition at line 41 of file portable.hpp.

Referenced by Owl::active_update(), Owl::collision_squished(), Player::stop_climbing(), and Player::update().

00042   {}

virtual bool Portable::is_portable (  )  const [inline, virtual]

Reimplemented in MrBomb, MrIceBlock, and Trampoline.

Definition at line 44 of file portable.hpp.

Referenced by Block::collision(), and Trampoline::is_portable().

00045   {
00046     return true;
00047   }

virtual bool Portable::is_hampering (  )  [inline, virtual]

Is the object so heavy/bulky/fragile that Tux can't run while carrying it?

Definition at line 53 of file portable.hpp.

Referenced by Player::handle_horizontal_input().

00054   {
00055     return false;
00056   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 14 03:38:42 2014 for SuperTux by  doxygen 1.5.1