Skip to main content

Class InteractionCommand

Represents a command issued to interact with an Interactable object.

public class InteractionCommand

Inheritance​

Constructors​

InteractionCommand(InteractableOption)​

Construct the command with the given interactable option.

public InteractionCommand(InteractableOption optoin)

Parameters​

NameTypeDescription
optoinInteractableOption

Exceptions​

ArgumentException — Thrown if the index is invalid for the specified source.

Properties​

ElapsedTime​

Gets the elapsed time in seconds since this interaction command was created.

public float ElapsedTime { get; }

Property Value​

float

Option​

Gets the InteractableOption associated with this command.

public InteractableOption Option { get; }

Property Value​

InteractableOption

Progress​

Gets the progress of the interaction, calculated as elapsed time divided by the option's duration. Returns 1 if the duration is zero or negative.

public float Progress { get; }

Property Value​

float