scripting::Player Class Reference

#include <player.hpp>

Inherited by Player.

List of all members.

Public Member Functions

virtual ~Player ()
virtual bool add_bonus (const std::string &bonus)=0
 Set tux bonus.
virtual void add_coins (int count)=0
 Give tux more coins.
virtual void make_invincible ()=0
 Make tux invincible for a short amount of time.
virtual void deactivate ()=0
 Deactivate user/scripting input for Tux.
virtual void activate ()=0
 Give control back to user/scripting.
virtual void walk (float speed)=0
 Make Tux walk.
virtual void set_visible (bool visible)=0
 Set player visible or invisible.
virtual bool get_visible ()=0
 returns true if the player is currently visible (that is he was not set invisible by the set_visible method)
virtual void kill (bool completely)=0
 Hurts a player, if completely=true then the player will be killed even if he had grow or fireflower bonus.
virtual void set_ghost_mode (bool enable)=0
 Switches ghost mode on/off.
virtual bool get_ghost_mode ()=0
 Returns whether ghost mode is currently enabled.
virtual void do_cheer ()=0
 play cheer animation.
virtual void do_duck ()=0
 duck down if possible.
virtual void do_standup ()=0
 stand back up if possible.
virtual void do_backflip ()=0
 do a backflip if possible.
virtual void do_jump (float yspeed)=0
 jump in the air if possible sensible values for yspeed are negative - unless we want to jump into the ground of course
virtual void trigger_sequence (std::string sequence_name)=0
 Orders the current GameSession to start a sequence.
virtual void use_scripting_controller (bool use_or_release)=0
 Uses a scriptable controller for all user input (or restores controls).
virtual void do_scripting_controller (std::string control, bool pressed)=0
 Instructs the scriptable controller to press or release a button.


Detailed Description

Definition at line 26 of file player.hpp.


Constructor & Destructor Documentation

virtual scripting::Player::~Player (  )  [inline, virtual]

Reimplemented in Player.

Definition at line 30 of file player.hpp.

00031   {}


Member Function Documentation

virtual bool scripting::Player::add_bonus ( const std::string &  bonus  )  [pure virtual]

Set tux bonus.

This can be "grow", "fireflower" or "iceflower" at the moment

Implemented in Player.

Referenced by scripting::wrapper::Player_add_bonus_wrapper().

virtual void scripting::Player::add_coins ( int  count  )  [pure virtual]

Give tux more coins.

Implemented in Player.

Referenced by scripting::wrapper::Player_add_coins_wrapper().

virtual void scripting::Player::make_invincible (  )  [pure virtual]

Make tux invincible for a short amount of time.

Implemented in Player.

Referenced by scripting::wrapper::Player_make_invincible_wrapper().

virtual void scripting::Player::deactivate (  )  [pure virtual]

Deactivate user/scripting input for Tux.

Implemented in Player.

Referenced by scripting::wrapper::Player_deactivate_wrapper().

virtual void scripting::Player::activate (  )  [pure virtual]

Give control back to user/scripting.

Implemented in Player.

Referenced by scripting::wrapper::Player_activate_wrapper().

virtual void scripting::Player::walk ( float  speed  )  [pure virtual]

Make Tux walk.

Implemented in Player.

Referenced by scripting::wrapper::Player_walk_wrapper().

virtual void scripting::Player::set_visible ( bool  visible  )  [pure virtual]

Set player visible or invisible.

Implemented in Player.

Referenced by scripting::wrapper::Player_set_visible_wrapper().

virtual bool scripting::Player::get_visible (  )  [pure virtual]

returns true if the player is currently visible (that is he was not set invisible by the set_visible method)

Implemented in Player.

Referenced by scripting::wrapper::Player_get_visible_wrapper().

virtual void scripting::Player::kill ( bool  completely  )  [pure virtual]

Hurts a player, if completely=true then the player will be killed even if he had grow or fireflower bonus.

Implemented in Player.

Referenced by scripting::wrapper::Player_kill_wrapper().

virtual void scripting::Player::set_ghost_mode ( bool  enable  )  [pure virtual]

Switches ghost mode on/off.

Lets Tux float around and through solid objects.

Implemented in Player.

Referenced by scripting::ghost(), scripting::mortal(), and scripting::wrapper::Player_set_ghost_mode_wrapper().

virtual bool scripting::Player::get_ghost_mode (  )  [pure virtual]

Returns whether ghost mode is currently enabled.

Implemented in Player.

Referenced by scripting::wrapper::Player_get_ghost_mode_wrapper().

virtual void scripting::Player::do_cheer (  )  [pure virtual]

play cheer animation.

This might need some space and behave in an unpredictable way. Best to use this at level end.

Implemented in Player.

Referenced by scripting::wrapper::Player_do_cheer_wrapper().

virtual void scripting::Player::do_duck (  )  [pure virtual]

duck down if possible.

this won't last long as long as input is enabled.

Implemented in Player.

Referenced by scripting::wrapper::Player_do_duck_wrapper().

virtual void scripting::Player::do_standup (  )  [pure virtual]

stand back up if possible.

Implemented in Player.

Referenced by scripting::wrapper::Player_do_standup_wrapper().

virtual void scripting::Player::do_backflip (  )  [pure virtual]

do a backflip if possible.

Implemented in Player.

Referenced by scripting::wrapper::Player_do_backflip_wrapper().

virtual void scripting::Player::do_jump ( float  yspeed  )  [pure virtual]

jump in the air if possible sensible values for yspeed are negative - unless we want to jump into the ground of course

Implemented in Player.

Referenced by scripting::wrapper::Player_do_jump_wrapper().

virtual void scripting::Player::trigger_sequence ( std::string  sequence_name  )  [pure virtual]

Orders the current GameSession to start a sequence.

Implemented in Player.

Referenced by scripting::wrapper::Player_trigger_sequence_wrapper().

virtual void scripting::Player::use_scripting_controller ( bool  use_or_release  )  [pure virtual]

Uses a scriptable controller for all user input (or restores controls).

Implemented in Player.

Referenced by scripting::wrapper::Player_use_scripting_controller_wrapper().

virtual void scripting::Player::do_scripting_controller ( std::string  control,
bool  pressed 
) [pure virtual]

Instructs the scriptable controller to press or release a button.

Implemented in Player.

Referenced by scripting::wrapper::Player_do_scripting_controller_wrapper().


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