interface MAGES::ILocomotionProvider

Overview

A provider of locomotion for a LocomotionSystem. More…

interface ILocomotionProvider
{
    // properties

    ILocomotionSystem LocomotionSystem;
    LocomotionPhase LocomotionPhase;
    UnityEvent<LocomotionStartEventArgs> LocomotionStarted;
    UnityEvent<LocomotionEndEventArgs> LocomotionEnded;

    // methods

    bool CanStartLocomotion();
    bool StartLocomotion(float time);
    bool EndLocomotion();
};

// direct descendants

class BaseLocomotionProvider;

Detailed Documentation

A provider of locomotion for a LocomotionSystem.

A LocomotionProvider may provide movement and rotation to the Rig through a LocomotionSystem.

It can also be used to provide locomotion to other objects, managed with a LocomotionSystem.

It works by granting exclusive access to the System and then manipulating the transform.

Properties

ILocomotionSystem LocomotionSystem

Gets or sets the locomotion system this provider is registered with.

LocomotionPhase LocomotionPhase

Gets the current locomotion phase of this provider.

UnityEvent<LocomotionStartEventArgs> LocomotionStarted

Gets or sets the event called when a locomotion has just started.

UnityEvent<LocomotionEndEventArgs> LocomotionEnded

Gets or sets the event called when a locomotion has just finished.

Methods

bool CanStartLocomotion()

Gets if this provider can start a locomotion.

Returns:

true if can start a locomotion.

bool StartLocomotion(float time)

Starts a locomotion.

Parameters:

time

The time after which the locomotion will end automatically.

Returns:

true if the locomotion was started successfully. ie The LocomotionSystem was not busy.

bool EndLocomotion()

Ends the locomotion.

Returns:

true on success.