Table of Contents

Class Primitive

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

A wrapper class for AdminToys.PrimitiveObjectToy.

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

Properties

Base

Gets the base AdminToys.PrimitiveObjectToy.

public PrimitiveObjectToy Base { get; }

Property Value

PrimitiveObjectToy

Collidable

Gets or sets a value indicating whether the primitive can be collided with.

public bool Collidable { get; set; }

Property Value

bool

Color

Gets or sets the material color of the primitive.

public Color Color { get; set; }

Property Value

Color

Flags

Gets or sets the primitive flags.

public PrimitiveFlags Flags { get; set; }

Property Value

PrimitiveFlags

Prefab

Gets the prefab.

public static PrimitiveObjectToy Prefab { get; }

Property Value

PrimitiveObjectToy

Type

Gets or sets the type of the primitive.

public PrimitiveType Type { get; set; }

Property Value

PrimitiveType

Visible

Gets or sets a value indicating whether the primitive is visible.

public bool Visible { get; set; }

Property Value

bool

Methods

Create(PrimitiveSettings)

Creates a new Primitive.

public static Primitive Create(PrimitiveSettings primitiveSettings)

Parameters

primitiveSettings PrimitiveSettings

The settings of the Primitive.

Returns

Primitive

The new Primitive.

Create(Vector3?, Vector3?, Vector3?, bool)

Creates a new Primitive.

public static Primitive Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)

Parameters

position Vector3?

The position of the Primitive.

rotation Vector3?

The rotation of the Primitive.

scale Vector3?

The scale of the Primitive.

spawn bool

Whether the Primitive should be initially spawned.

Returns

Primitive

The new Primitive.

Create(Vector3?, Vector3?, Vector3?, bool, Color?)

Creates a new Primitive.

public static Primitive Create(Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)

Parameters

position Vector3?

The position of the Primitive.

rotation Vector3?

The rotation of the Primitive.

scale Vector3?

The scale of the Primitive.

spawn bool

Whether the Primitive should be initially spawned.

color Color?

The color of the Primitive.

Returns

Primitive

The new Primitive.

Create(PrimitiveType, PrimitiveFlags, Vector3?, Vector3?, Vector3?, bool, Color?)

Creates a new Primitive.

public static Primitive Create(PrimitiveType primitiveType, PrimitiveFlags flags, Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)

Parameters

primitiveType PrimitiveType

The type of primitive to spawn.

flags PrimitiveFlags

The primitive flags.

position Vector3?

The position of the Primitive.

rotation Vector3?

The rotation of the Primitive.

scale Vector3?

The scale of the Primitive.

spawn bool

Whether the Primitive should be initially spawned.

color Color?

The color of the Primitive.

Returns

Primitive

The new Primitive.

Create(PrimitiveType, Vector3?, Vector3?, Vector3?, bool)

Creates a new Primitive.

public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Sphere, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)

Parameters

primitiveType PrimitiveType

The type of primitive to spawn.

position Vector3?

The position of the Primitive.

rotation Vector3?

The rotation of the Primitive.

scale Vector3?

The scale of the Primitive.

spawn bool

Whether the Primitive should be initially spawned.

Returns

Primitive

The new Primitive.

Create(PrimitiveType, Vector3?, Vector3?, Vector3?, bool, Color?)

Creates a new Primitive.

public static Primitive Create(PrimitiveType primitiveType, Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)

Parameters

primitiveType PrimitiveType

The type of primitive to spawn.

position Vector3?

The position of the Primitive.

rotation Vector3?

The rotation of the Primitive.

scale Vector3?

The scale of the Primitive.

spawn bool

Whether the Primitive should be initially spawned.

color Color?

The color of the Primitive.

Returns

Primitive

The new Primitive.

Get(PrimitiveObjectToy)

Gets the Primitive belonging to the AdminToys.PrimitiveObjectToy.

public static Primitive Get(PrimitiveObjectToy primitiveObjectToy)

Parameters

primitiveObjectToy PrimitiveObjectToy

The AdminToys.PrimitiveObjectToy instance.

Returns

Primitive

The corresponding Primitive instance.