Class InteractableToy
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
IsLocked
Gets or sets a value indicating whether the interactable is locked.
public bool IsLocked { get; set; }
Property Value
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
transformTransformThe transform to create this InteractableToy on.
shapeInvisibleInteractableToy.ColliderShapeThe shape of the collider.
interactionDurationfloatHow long the interaction takes.
isLockedboolWhether the object is locked.
spawnboolWhether 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
parentTransformThe transform to create this InteractableToy on.
positionVector3?The local position of the InteractableToy.
rotationQuaternion?The local rotation of the InteractableToy.
scaleVector3?The local scale of the InteractableToy.
shapeInvisibleInteractableToy.ColliderShapeThe shape of the collider.
interactionDurationfloatHow long the interaction takes.
isLockedboolWhether the object is locked.
spawnboolWhether 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
positionVector3The 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
positionVector3The local position of the InteractableToy.
shapeInvisibleInteractableToy.ColliderShapeThe 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
positionVector3The local position of the InteractableToy.
shapeInvisibleInteractableToy.ColliderShapeThe shape of the collider.
durationfloatHow long the interaction takes.
Returns
- InteractableToy
The new InteractableToy.