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
primitiveSettingsPrimitiveSettingsThe 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
positionVector3?The position of the Primitive.
rotationVector3?The rotation of the Primitive.
scaleVector3?The scale of the Primitive.
spawnboolWhether 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
positionVector3?The position of the Primitive.
rotationVector3?The rotation of the Primitive.
scaleVector3?The scale of the Primitive.
spawnboolWhether the Primitive should be initially spawned.
colorColor?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
primitiveTypePrimitiveTypeThe type of primitive to spawn.
flagsPrimitiveFlagsThe primitive flags.
positionVector3?The position of the Primitive.
rotationVector3?The rotation of the Primitive.
scaleVector3?The scale of the Primitive.
spawnboolWhether the Primitive should be initially spawned.
colorColor?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
primitiveTypePrimitiveTypeThe type of primitive to spawn.
positionVector3?The position of the Primitive.
rotationVector3?The rotation of the Primitive.
scaleVector3?The scale of the Primitive.
spawnboolWhether 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
primitiveTypePrimitiveTypeThe type of primitive to spawn.
positionVector3?The position of the Primitive.
rotationVector3?The rotation of the Primitive.
scaleVector3?The scale of the Primitive.
spawnboolWhether the Primitive should be initially spawned.
colorColor?The color of the Primitive.
Returns
Get(PrimitiveObjectToy)
Gets the Primitive belonging to the AdminToys.PrimitiveObjectToy.
public static Primitive Get(PrimitiveObjectToy primitiveObjectToy)
Parameters
primitiveObjectToyPrimitiveObjectToyThe AdminToys.PrimitiveObjectToy instance.