ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Make an item follow pre-computed path. More...

#include <followpath.h>

Inheritance diagram for Stark::FollowPath:
Collaboration diagram for Stark::FollowPath:

List of all members.

Public Member Functions

 FollowPath (Resources::ItemVisual *item)
virtual ~FollowPath ()
void start () override
 Initiate the movement.
void onGameLoop () override
 Called once per game loop.
void stop (bool force=false) override
 Stop / abort the movement.
uint32 getType () const override
 Obtain the effective movement type.
void saveLoad (ResourceSerializer *serializer) override
 Persist / restore the state of the movement so it can be resumed using 'start'.
void setPath (Resources::Path *path)
 Set the path to follow.
void setSpeed (float speed)
 Set the movement speed on the path.
void setAnim (Resources::Anim *anim)
 Override the animation to play while the item follows the path.

Private Member Functions

void changeItemAnim ()
void updateItemPosition (uint currentEdge, float positionInEdge) const
bool is3D () const

Private Attributes

Resources::Path_path
float _speed
float _position
bool _previouslyEnabled
Resources::Anim_anim

Detailed Description

Make an item follow pre-computed path.

Works for 2D and 3D items, with respectively 2D and 3D paths

Definition at line 40 of file followpath.h.


Constructor & Destructor Documentation

Stark::FollowPath::FollowPath ( Resources::ItemVisual item  ) 

Definition at line 36 of file followpath.cpp.

Stark::FollowPath::~FollowPath (  )  [virtual]

Definition at line 45 of file followpath.cpp.


Member Function Documentation

void Stark::FollowPath::changeItemAnim (  )  [private]

Definition at line 116 of file followpath.cpp.

uint32 Stark::FollowPath::getType (  )  const [override, virtual]

Obtain the effective movement type.

Implements Stark::Movement.

Definition at line 148 of file followpath.cpp.

bool Stark::FollowPath::is3D (  )  const [private]

Definition at line 140 of file followpath.cpp.

void Stark::FollowPath::onGameLoop (  )  [override, virtual]

Called once per game loop.

Implements Stark::Movement.

Definition at line 65 of file followpath.cpp.

void Stark::FollowPath::saveLoad ( ResourceSerializer serializer  )  [override, virtual]

Persist / restore the state of the movement so it can be resumed using 'start'.

Implements Stark::Movement.

Definition at line 152 of file followpath.cpp.

void Stark::FollowPath::setAnim ( Resources::Anim anim  ) 

Override the animation to play while the item follows the path.

Definition at line 144 of file followpath.cpp.

void Stark::FollowPath::setPath ( Resources::Path path  ) 

Set the path to follow.

Definition at line 132 of file followpath.cpp.

void Stark::FollowPath::setSpeed ( float  speed  ) 

Set the movement speed on the path.

Definition at line 136 of file followpath.cpp.

void Stark::FollowPath::start (  )  [override, virtual]

Initiate the movement.

Reimplemented from Stark::Movement.

Definition at line 48 of file followpath.cpp.

void Stark::FollowPath::stop ( bool  force = false  )  [override, virtual]

Stop / abort the movement.

Reimplemented from Stark::Movement.

Definition at line 58 of file followpath.cpp.

void Stark::FollowPath::updateItemPosition ( uint  currentEdge,
float  positionInEdge 
) const [private]

Definition at line 91 of file followpath.cpp.


Member Data Documentation

Definition at line 72 of file followpath.h.

Definition at line 66 of file followpath.h.

Definition at line 69 of file followpath.h.

Definition at line 70 of file followpath.h.

float Stark::FollowPath::_speed [private]

Definition at line 67 of file followpath.h.


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


Generated on Sat May 18 2019 05:07:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge