Class Interactable
- Namespace
- AO
- Assembly
- CoreAssembly.dll
A component that a player can interact with. The interaction will take place on both the client and the server.
public class Interactable : Component
- Inheritance
-
Interactable
- Inherited Members
- Extension Methods
Fields
AdditionalCanUses
public List<Func<Player, bool>> AdditionalCanUses
Field Value
CanUseCallback
Called to determine if the player is able to interact with the interactable If OnInteract is called, then that means this function (as long as it's pure, which it should be) is guaranteed to evaluate to true.
public Func<Player, bool> CanUseCallback
Field Value
Remarks
This is called on both the client and the server
OnHoldingInteract
Called every frame the player is holding to interact. Return false to cancel the interaction, true to allow it to continue. If OnInteract is called, then that means this function (as long as it's pure, which it should be) is guaranteed to evaluate to true.
public Func<Player, bool> OnHoldingInteract
Field Value
Remarks
This is called on both the client and the server
OnInteract
Called when the player fills the interact meter.
public Action<Player> OnInteract
Field Value
Remarks
This is called on both the client and the server
Properties
HoldText
public string HoldText { get; set; }
Property Value
Priority
public int Priority { get; set; }
Property Value
PromptOffset
public Vector2 PromptOffset { get; set; }
Property Value
Radius
public float Radius { get; set; }
Property Value
RequiredHoldTime
public float RequiredHoldTime { get; set; }
Property Value
ShowingSinceTime
public float ShowingSinceTime { get; set; }
Property Value
ShowingT
public float ShowingT { get; set; }
Property Value
Text
public string Text { get; set; }
Property Value
WillShowUi
public bool WillShowUi { get; set; }
Property Value
Methods
GetScreenRect()
The screen rect of the interactable UI.
public Rect GetScreenRect()
Returns
GetShowing01()
The time the interactable UI has been showing as a 0-1 value
public float GetShowing01()
Returns
GetShowingSinceTime()
The time the interactable UI has been showing
public float GetShowingSinceTime()
Returns
IsUIShowing()
Is the interactable UI showing
public bool IsUIShowing()