Table of Contents

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

List<Func<Player, bool>>

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

Func<Player, bool>

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

Func<Player, bool>

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

Action<Player>

Remarks

This is called on both the client and the server

Properties

HoldText

public string HoldText { get; set; }

Property Value

string

Priority

public int Priority { get; set; }

Property Value

int

PromptOffset

public Vector2 PromptOffset { get; set; }

Property Value

Vector2

Radius

public float Radius { get; set; }

Property Value

float

RequiredHoldTime

public float RequiredHoldTime { get; set; }

Property Value

float

ShowingSinceTime

public float ShowingSinceTime { get; set; }

Property Value

float

ShowingT

public float ShowingT { get; set; }

Property Value

float

Text

public string Text { get; set; }

Property Value

string

WillShowUi

public bool WillShowUi { get; set; }

Property Value

bool

Methods

GetScreenRect()

The screen rect of the interactable UI.

public Rect GetScreenRect()

Returns

Rect

GetShowing01()

The time the interactable UI has been showing as a 0-1 value

public float GetShowing01()

Returns

float

GetShowingSinceTime()

The time the interactable UI has been showing

public float GetShowingSinceTime()

Returns

float

IsUIShowing()

Is the interactable UI showing

public bool IsUIShowing()

Returns

bool