API reference
API reference
Select your platform
No SDKs available
No versions available

LocomotionActionsBroadcaster Class

Extends MonoBehaviour, ILocomotionEventBroadcaster
LocomotionActionsBroadcaster generates LocomotionEvents without a Translation or Rotation but decorates them with extra information regarding instantaneous locomotion actions that can be consumed by a Locomotor.
Decorations are only active during the WhenLocomotionPerformed event and should be consumed and managed by the specific implementations

Member Enumerations

Enumeration LocomotionAction

Crouch
No description available
StandUp
No description available
ToggleCrouch
No description available
Run
No description available
Walk
No description available
ToggleRun
No description available
Jump
No description available

Fields

int Identifier[Get]

Events

Action< LocomotionEvent > WhenLocomotionPerformed

Protected Functions

virtual void Awake ( )

Member Functions

Sends an Action down the LocomotionEvent pipeline and inmediately disposes it
Parameters
action
The action to be sent
Sends an immediate Crouch Action down the LocomotionEvent pipeline
Sends an immediate StandUp Action down the LocomotionEvent pipeline
Sends an immediate ToggleCrouch Action down the LocomotionEvent pipeline
Sends an immediate Run Action down the LocomotionEvent pipeline
Sends an immediate Walk Action down the LocomotionEvent pipeline
Sends an immediate ToggleRun Action down the LocomotionEvent pipeline
Sends an immediate Jump Action down the LocomotionEvent pipeline
void InjectOptionalContext
( Context context )

Static Member Functions

This utility method allows creating LocomotionAction decorations
Parameters
identifier
The identifier of the sender
action
The action to send
pose
The pose to be sent in the LocomotionEvent, note that this won't have any Translation or Rotation applied
context
The context used for storing the decoration
Returns
The LocomotionEvent decorated with the action
This utility methods allows retrieving the LocomotionAction from a given LocomotionEvent, if it contains one.
Parameters
locomotionEvent
The LocomotionEvent potentially containing the LocomotionAction
action
The LocomotionAction that it contained
context
The context used for storing the decoration
Returns
True if the LocomotionEvent contained a valid LocomotionAction
This utility method removes the LocomotionAction decoration from the LocomotionEvent.
These decorations are not automatically removed, so it is important to manually call this method to avoid filling the memory with obsolete decorations
Parameters
locomotionEvent
The event containing the LocomotionAction decoration.
context
The context storing the decoration
Did you find this page helpful?
Thumbs up icon
Thumbs down icon