interface MAGES::ILocomotionSystem¶
Overview¶
An interface to provide exclusive access to the Player Rig. More…
interface ILocomotionSystem { // properties IPlayerRig Rig; ILocomotionProvider ExclusiveProvider; UnityEvent<ExclusiveAccessGrantedEventArgs> ExclusiveAccessGranted; UnityEvent<ExclusiveAccessFinishedEventArgs> ExclusiveAccessEnded; bool IsBusy; // methods bool RequestExclusiveAccess(ILocomotionProvider provider, float timeout); bool EndExclusiveAccess(ILocomotionProvider provider); }; // direct descendants class LocomotionSystem;
Detailed Documentation¶
An interface to provide exclusive access to the Player Rig.
Properties¶
IPlayerRig Rig
Gets or sets the Rig that is being controlled.
ILocomotionProvider ExclusiveProvider
Gets the current provider that is performing an exclusive operation. null
if not busy.
UnityEvent<ExclusiveAccessGrantedEventArgs> ExclusiveAccessGranted
Gets the event called when the exclusive access is granted.
UnityEvent<ExclusiveAccessFinishedEventArgs> ExclusiveAccessEnded
Gets the event called when the exclusive access is finished.
bool IsBusy
Gets a value indicating whether the system is busy with an exclusive operation.
Methods¶
bool RequestExclusiveAccess(ILocomotionProvider provider, float timeout)
Start an exclusive operation with the Rig.
Parameters:
provider |
The provider with which to start the operation. |
timeout |
The time in seconds after which the exclusive access will finish. |
Returns:
true
if the operation was started successfully.
bool EndExclusiveAccess(ILocomotionProvider provider)
Finish an exclusive operation with the Rig.
Parameters:
provider |
The provider to end the operation. |
Returns:
true
if the provider was performing an exclusive operation that was now ended successfully.