18 #ifndef HEADER_SUPERTUX_WORLDMAP_TUX_HPP 19 #define HEADER_SUPERTUX_WORLDMAP_TUX_HPP 21 #include "supertux/game_object.hpp" 23 #include "sprite/sprite_ptr.hpp" 24 #include "supertux/player_status.hpp" 40 virtual void update(
float dt_sec)
override;
46 void set_direction(Direction dir);
48 void set_ghost_mode(
bool enabled);
49 bool get_ghost_mode()
const;
51 bool is_moving()
const {
return m_moving; }
52 Vector get_pos()
const;
53 Vector get_axis()
const;
54 Vector get_tile_pos()
const {
return m_tile_pos; }
55 void set_initial_pos(
const Vector& pos) { m_initial_tile_pos = pos / 32.f; }
56 void set_tile_pos(
const Vector& pos) { m_tile_pos = pos; }
58 void process_special_tile(
SpecialTile* special_tile);
62 std::string get_action_prefix_for_bonus(
const BonusType& bonus)
const;
63 bool can_walk(
int tile_data, Direction dir)
const;
64 void update_input_direction();
65 void try_start_walking();
66 void try_continue_walking(
float dt_sec);
71 Direction m_back_direction;
78 Direction m_input_direction;
79 Direction m_direction;
80 Vector m_initial_tile_pos;
91 Tux& operator=(
const Tux&) =
delete;
Definition: controller.hpp:57
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: tux.hpp:42
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: tux.cpp:58
Definition: object_settings.hpp:32
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
void setup()
called prior to first update
Definition: tux.cpp:373
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: tux.cpp:361
Definition: special_tile.hpp:28
Definition: sprite_change.hpp:27
virtual GameObjectClasses get_class_types() const
List notable classes in inheritance hierarchy of class.
Definition: game_object.cpp:113
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
virtual bool is_singleton() const override
If true only a single object of this type is allowed in a given GameObjectManager.
Definition: tux.hpp:41
Definition: worldmap.hpp:33