|
supertux
|
Public Member Functions | |
| bool | add_bonus (const std::string &bonus) |
| Set tux bonus. More... | |
| bool | set_bonus (const std::string &bonus) |
| Replaces the Tux's bonus with another bonus. More... | |
| void | add_coins (int count) |
| Give tux more coins. More... | |
| int | get_coins () const |
| Returns the number of coins the player currently has. | |
| void | make_invincible () |
| Make tux invincible for a short amount of time. | |
| void | deactivate () |
| Deactivate user/scripting input for Tux. | |
| void | activate () |
| Give control back to user/scripting. | |
| void | walk (float speed) |
| Make Tux walk. | |
| void | set_dir (bool right) |
| Face Tux in the proper direction. | |
| void | set_visible (bool visible) |
| Set player visible or invisible. | |
| bool | get_visible () const |
| returns true if Tux is currently visible (that is he was not set invisible by the set_visible method) | |
| void | kill (bool completely) |
| Hurts Tux, if completely=true then he will be killed even if he had grow or fireflower bonus. | |
| void | set_ghost_mode (bool enable) |
| Switches ghost mode on/off. More... | |
| bool | get_ghost_mode () const |
| Returns whether ghost mode is currently enabled. | |
| void | kick () |
| start kick animation | |
| void | do_cheer () |
| play cheer animation. More... | |
| void | do_duck () |
| duck down if possible. More... | |
| void | do_standup () |
| stand back up if possible. | |
| void | do_backflip () |
| do a backflip if possible. | |
| void | do_jump (float yspeed) |
| jump in the air if possible sensible values for yspeed are negative - unless we want to jump into the ground of course | |
| void | trigger_sequence (const std::string &sequence_name) |
| Orders the current GameSession to start a sequence. | |
| void | use_scripting_controller (bool use_or_release) |
| Uses a scriptable controller for all user input (or restores controls) | |
| bool | has_grabbed (const std::string &name) const |
| Check whether player is carrying a certain object. More... | |
| void | do_scripting_controller (const std::string &control, bool pressed) |
| Instructs the scriptable controller to press or release a button. | |
| float | get_velocity_x () const |
| float | get_velocity_y () const |
Public Member Functions inherited from scripting::GameObject<::Player > | |
| GameObject (UID uid) | |
| ::Player * | get_object_ptr () const |
Additional Inherited Members | |
Protected Attributes inherited from scripting::GameObject<::Player > | |
| UID | m_uid |
| bool Player::add_bonus | ( | const std::string & | bonus | ) |
Set tux bonus.
This can be "grow", "fireflower" or "iceflower" at the moment
| void Player::add_coins | ( | int | count | ) |
Give tux more coins.
If count is a negative amount of coins, that number of coins will be taken from the player (until the number of coins the player has is 0, when it will stop changing).
| void Player::do_cheer | ( | ) |
play cheer animation.
This might need some space and behave in an unpredictable way. Best to use this at level end.
| void Player::do_duck | ( | ) |
duck down if possible.
this won't last long as long as input is enabled.
| bool Player::has_grabbed | ( | const std::string & | name | ) | const |
Check whether player is carrying a certain object.
| name | Name of the Portable object to check for |
| bool Player::set_bonus | ( | const std::string & | bonus | ) |
Replaces the Tux's bonus with another bonus.
This can be "grow", "fireflower" or "iceflower" at the moment
| void Player::set_ghost_mode | ( | bool | enable | ) |
Switches ghost mode on/off.
Lets Tux float around and through solid objects.
1.8.12