Class Primitive
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
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
Methods
Create(PrimitiveSettings)
Creates a new Primitive.
public static Primitive Create(PrimitiveSettings primitiveSettings)
Parameters
primitiveSettings
PrimitiveSettingsThe settings of the Primitive.
Returns
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
boolWhether the Primitive should be initially spawned.
Returns
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
boolWhether the Primitive should be initially spawned.
color
Color?The color of the Primitive.
Returns
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
PrimitiveTypeThe type of primitive to spawn.
flags
PrimitiveFlagsThe primitive flags.
position
Vector3?The position of the Primitive.
rotation
Vector3?The rotation of the Primitive.
scale
Vector3?The scale of the Primitive.
spawn
boolWhether the Primitive should be initially spawned.
color
Color?The color of the Primitive.
Returns
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
PrimitiveTypeThe 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
boolWhether the Primitive should be initially spawned.
Returns
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
PrimitiveTypeThe 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
boolWhether the Primitive should be initially spawned.
color
Color?The color of the Primitive.
Returns
Get(PrimitiveObjectToy)
Gets the Primitive belonging to the AdminToys.PrimitiveObjectToy.
public static Primitive Get(PrimitiveObjectToy primitiveObjectToy)
Parameters
primitiveObjectToy
PrimitiveObjectToyThe AdminToys.PrimitiveObjectToy instance.