17 #ifndef HEADER_SUPERTUX_OBJECT_PATH_WALKER_HPP 18 #define HEADER_SUPERTUX_OBJECT_PATH_WALKER_HPP 23 #include "object/path.hpp" 24 #include "util/uid.hpp" 56 Path* get_path()
const;
65 size_t m_current_node_nr;
66 size_t m_next_node_nr;
69 int m_stop_at_node_nr;
76 float m_walking_speed;
A walker that travels along a path.
Definition: path_walker.hpp:29
bool m_running
set to false to immediately stop advancing
Definition: path_walker.hpp:62
Simple two dimensional vector.
Definition: vector.hpp:24
Definition: object_option.hpp:48
Vector get_pos() const
current position of path walker
Definition: path_walker.cpp:101
void goto_node(int node_no)
advance until at given node, then stop
Definition: path_walker.cpp:117
void start_moving()
start advancing automatically
Definition: path_walker.cpp:128
bool is_running() const
returns true if PathWalker is currently moving
Definition: path_walker.hpp:51
void stop_moving()
stop advancing automatically
Definition: path_walker.cpp:135
void update(float dt_sec)
advances the path walker on the path and returns its new position
Definition: path_walker.cpp:69