-
Notifications
You must be signed in to change notification settings - Fork 16
Package
Namespace: TommoJProductions.ModApi.Attachable
Represents a package that can hold multiple parts. Can be unpacked.
public abstract class PackageThe package prefab.
public abstract 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 Package()Sets Package parameters. Default position. (0, 0, 0) Haybed out back of house.
public Package(string name)name String
The name of the package
Sets Package parameters.
public Package(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 Package(PackageSettings packageSettings)packageSettings PackageSettings
createPackage phase 2. Destroys all part rigidbodies. Waits until rigidbody is Destroyed, Deactivates part and sets the parts parent to the package.
protected virtual IEnumerator createFunction()The part spawn logic. enables the parts inside the package.
protected virtual void spawnParts()Creates a package with within.
public virtual void createPackage(GameObject[] objects)objects GameObject[]
the gameobjects to pack into the created box.
Opens the package.
public abstract virtual void openPackage()