supertux
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
PathObject Class Reference

A base class for all objects that contain, or make use of a path. More...

#include <path_object.hpp>

Inheritance diagram for PathObject:
Inheritance graph
[legend]
Collaboration diagram for PathObject:
Collaboration graph
[legend]

Public Member Functions

void init_path (const ReaderMapping &mapping, bool running_default)
 For compatibilty reasons this needs to get the GameObjects main mapping, not the (path ...) mapping.
 
void init_path_pos (const Vector &pos, bool running=false)
 
PathGameObjectget_path_gameobject () const
 
Pathget_path () const
 
PathWalkerget_walker () const
 
void editor_clone_path (PathGameObject *path_object)
 
std::string get_path_ref () const
 
void editor_set_path_by_ref (const std::string &new_ref)
 
void goto_node (int node_idx)
 Moves the path object until at given node, then stops. More...
 
void set_node (int node_idx)
 Jumps instantly to the given node. More...
 
void start_moving ()
 Starts moving the path object automatically.
 
void stop_moving ()
 Stops moving the path object.
 

Protected Member Functions

void save_state () const
 
void check_state () const
 
void on_flip ()
 

Static Protected Member Functions

static void register_members (ssq::Class &cls)
 

Protected Attributes

PathWalker::Handle m_path_handle
 

Detailed Description

A base class for all objects that contain, or make use of a path.

Member Function Documentation

◆ goto_node()

void PathObject::goto_node ( int  node_idx)

Moves the path object until at given node, then stops.

Parameters
int$node_idx

◆ set_node()

void PathObject::set_node ( int  node_idx)

Jumps instantly to the given node.

Parameters
int$node_idx

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