ScummVM API documentation
Stark::Walk Class Reference

#include <walk.h>

Inheritance diagram for Stark::Walk:
Stark::Movement

Public Member Functions

 Walk (Resources::FloorPositionedItem *item)
 
void start () override
 
void stop (bool force=false) override
 
void onGameLoop () override
 
bool hasReachedDestination () const override
 
uint32 getType () const override
 
void saveLoad (ResourceSerializer *serializer) override
 
void setDestination (const Math::Vector3d &destination)
 
void setDestinationWithoutHeight (Math::Vector3d destination)
 
void changeDestination (const Math::Vector3d &destination)
 
void setRunning ()
 
- Public Member Functions inherited from Stark::Movement
 Movement (Resources::ItemVisual *item)
 
bool hasEnded () const
 

Additional Inherited Members

- Public Types inherited from Stark::Movement
enum  MovementType { kTypeWalk = 1, kTypeFollowPath = 2, kTypeFollowPathLight = 3, kTypeTurn = 4 }
 
- Static Public Member Functions inherited from Stark::Movement
static Movementconstruct (uint32 type, Resources::ItemVisual *item)
 
- Protected Types inherited from Stark::Movement
enum  TurnDirection { kTurnNone, kTurnLeft, kTurnRight }
 
- Protected Member Functions inherited from Stark::Movement
float computeAngleBetweenVectorsXYPlane (const Math::Vector3d &v1, const Math::Vector3d &v2) const
 
- Protected Attributes inherited from Stark::Movement
const float _defaultTurnAngleSpeed
 
bool _ended
 
Resources::ItemVisual_item
 

Detailed Description

Make an item walk / run to its destination on the current location's floor

Member Function Documentation

◆ start()

void Stark::Walk::start ( )
overridevirtual

Initiate the movement

Reimplemented from Stark::Movement.

◆ stop()

void Stark::Walk::stop ( bool  force = false)
overridevirtual

Stop / abort the movement

Reimplemented from Stark::Movement.

◆ onGameLoop()

void Stark::Walk::onGameLoop ( )
overridevirtual

Called once per game loop

Implements Stark::Movement.

◆ hasReachedDestination()

bool Stark::Walk::hasReachedDestination ( ) const
overridevirtual

Has the movement reached its destination successfully?

Reimplemented from Stark::Movement.

◆ getType()

uint32 Stark::Walk::getType ( ) const
overridevirtual

Obtain the effective movement type

Implements Stark::Movement.

◆ saveLoad()

void Stark::Walk::saveLoad ( ResourceSerializer serializer)
overridevirtual

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

Implements Stark::Movement.

◆ setDestination()

void Stark::Walk::setDestination ( const Math::Vector3d &  destination)

Set the destination

◆ changeDestination()

void Stark::Walk::changeDestination ( const Math::Vector3d &  destination)

Change the destination and recompute the path

◆ setRunning()

void Stark::Walk::setRunning ( )

Set the running flag


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