supertux
Classes | Public Member Functions | Public Attributes | List of all members
PathWalker Class Referencefinal

A walker that travels along a path. More...

#include <path_walker.hpp>

Collaboration diagram for PathWalker:
Collaboration graph
[legend]

Classes

class  Handle
 Helper class that allows to displace a handle on an object. More...
 

Public Member Functions

 PathWalker (UID path_uid, bool running=true)
 
void update (float dt_sec)
 advances the path walker on the path and returns its new position
 
Vector get_pos (const Sizef &object_size, const Handle &handle) const
 current position of path walker
 
void goto_node (int node_idx)
 advance until at given node, then stop
 
void jump_to_node (int node_idx, bool instantaneous=false)
 teleport instantly to given node
 
void start_moving ()
 start advancing automatically
 
void stop_moving ()
 stop advancing automatically
 
bool is_running () const
 returns true if PathWalker is currently moving
 

Public Attributes

UID m_path_uid
 
bool m_running
 set to false to immediately stop advancing
 

Detailed Description

A walker that travels along a path.


The documentation for this class was generated from the following files: