-
Notifications
You must be signed in to change notification settings - Fork 17
Crate
Namespace: TommoJProductions.ModApi.Attachable
Represents The Crate (Package). Can hold multiple parts. Can be unpacked. Use the Digging Bar to pry open the crate!
public class Crate : Package
Inheritance Object → Package → Crate
public PryBehaviour behaviour;
The wooden crate prefab.
public virtual GameObject packagePrefab { get; }
GameObject
All the parts inside the package.
public GameObject[] packedObjects { get; }
GameObject[]
The package gameobject. The carboard box.
public GameObject package { get; }
GameObject
The packages model.
public GameObject model { get; }
GameObject
The package settings. pos, rot, size, part pos, rot.
public PackageSettings settings { get; }
The packages rigidbody.
public Rigidbody packageRigidBody { get; }
Rigidbody
The total calculated mass of the package.
public float packageMass { get; }
Sets Package parameters to defaults.
public Crate()
Sets Package parameters. Default position. (0, 0, 0) Haybed out back of house.
public Crate(string name)
name
String
The name of the package
Sets Package parameters.
public Crate(string name, Vector3 packagePosition, Vector3 packageRotation, Vector3 packageScale)
name
String
The name of the package
packagePosition
Vector3
The package spawn position.
packageRotation
Vector3
The package spawn rotation
packageScale
Vector3
The package scale.
Sets Package parameters.
public Crate(PackageSettings packageSettings)
packageSettings
PackageSettings
Opens the package.
public virtual void openPackage()
Creates the wooden crate.
public virtual void createPackage(GameObject[] objects)
objects
GameObject[]
The gameobjects to pack inside.