Table of Contents

Class InteractableToy

Namespace
Exiled.API.Features.Toys
Assembly
Exiled.API.dll

A wrapper class for AdminToys.InvisibleInteractableToy.

public class InteractableToy : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<InvisibleInteractableToy>
Inheritance
InteractableToy
Implements
IWrapper<InvisibleInteractableToy>
Inherited Members
Extension Methods

Properties

Base

Gets the base AdminToys.InvisibleInteractableToy.

public InvisibleInteractableToy Base { get; }

Property Value

InvisibleInteractableToy

InteractionDuration

Gets or sets the time to interact with the Interactable.

public float InteractionDuration { get; set; }

Property Value

float

IsLocked

Gets or sets a value indicating whether the interactable is locked.

public bool IsLocked { get; set; }

Property Value

bool

Prefab

Gets the prefab.

public static InvisibleInteractableToy Prefab { get; }

Property Value

InvisibleInteractableToy

Shape

Gets or sets the Shape of the Interactable.

public InvisibleInteractableToy.ColliderShape Shape { get; set; }

Property Value

InvisibleInteractableToy.ColliderShape

Methods

Create(Transform, ColliderShape, float, bool, bool)

Creates a new InteractableToy from a Transform.

public static InteractableToy Create(Transform transform, InvisibleInteractableToy.ColliderShape shape = ColliderShape.Sphere, float interactionDuration = 1, bool isLocked = false, bool spawn = true)

Parameters

transform Transform

The transform to create this InteractableToy on.

shape InvisibleInteractableToy.ColliderShape

The shape of the collider.

interactionDuration float

How long the interaction takes.

isLocked bool

Whether the object is locked.

spawn bool

Whether the InteractableToy should be initially spawned.

Returns

InteractableToy

The new InteractableToy.

Create(Transform, Vector3?, Quaternion?, Vector3?, ColliderShape, float, bool, bool)

Creates a new InteractableToy.

public static InteractableToy Create(Transform parent = null, Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null, InvisibleInteractableToy.ColliderShape shape = ColliderShape.Sphere, float interactionDuration = 1, bool isLocked = false, bool spawn = true)

Parameters

parent Transform

The transform to create this InteractableToy on.

position Vector3?

The local position of the InteractableToy.

rotation Quaternion?

The local rotation of the InteractableToy.

scale Vector3?

The local scale of the InteractableToy.

shape InvisibleInteractableToy.ColliderShape

The shape of the collider.

interactionDuration float

How long the interaction takes.

isLocked bool

Whether the object is locked.

spawn bool

Whether the InteractableToy should be initially spawned.

Returns

InteractableToy

The new InteractableToy.

Create(Vector3)

Creates a new InteractableToy at the specified position.

public static InteractableToy Create(Vector3 position)

Parameters

position Vector3

The local position of the InteractableToy.

Returns

InteractableToy

The new InteractableToy.

Create(Vector3, ColliderShape)

Creates a new InteractableToy with a specific position and shape.

public static InteractableToy Create(Vector3 position, InvisibleInteractableToy.ColliderShape shape)

Parameters

position Vector3

The local position of the InteractableToy.

shape InvisibleInteractableToy.ColliderShape

The shape of the collider.

Returns

InteractableToy

The new InteractableToy.

Create(Vector3, ColliderShape, float)

Creates a new InteractableToy with a specific position, shape, and interaction duration.

public static InteractableToy Create(Vector3 position, InvisibleInteractableToy.ColliderShape shape, float duration)

Parameters

position Vector3

The local position of the InteractableToy.

shape InvisibleInteractableToy.ColliderShape

The shape of the collider.

duration float

How long the interaction takes.

Returns

InteractableToy

The new InteractableToy.