17 #ifndef HEADER_SUPERTUX_WORLDMAP_SPRITE_CHANGE_HPP 18 #define HEADER_SUPERTUX_WORLDMAP_SPRITE_CHANGE_HPP 23 #include "math/vector.hpp" 24 #include "sprite/sprite_ptr.hpp" 25 #include "supertux/game_object.hpp" 35 static std::list<SpriteChange*> s_all_sprite_changes;
42 virtual void update(
float dt_sec)
override;
58 bool show_stay_action()
const;
60 Vector get_pos()
const {
return m_pos; }
72 std::string m_sprite_name;
78 std::string m_stay_action;
82 std::string m_stay_group;
86 bool m_in_stay_action;
Simple two dimensional vector.
Definition: vector.hpp:24
Definition: sprite.hpp:25
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: sprite_change.cpp:58
void clear_stay_action(bool propagate=true)
Deactivates the SpriteChange's stay action, if applicable.
Definition: sprite_change.cpp:84
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: sprite_change.cpp:67
bool m_change_on_touch
should tuxs sprite change when the tile has been completely entered, or already when the tile was jus...
Definition: sprite_change.hpp:68
Definition: object_settings.hpp:28
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
Definition: sprite_change.hpp:32
void set_stay_action()
Activates the SpriteChange's stay action, if applicable.
Definition: sprite_change.cpp:78
Definition: reader_mapping.hpp:31
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
SpritePtr m_sprite
sprite to change tux image to
Definition: sprite_change.hpp:71