Skip to main content

JengaStackingInstructionSetup

A class in Root.Township, Alta.Inventory.

Builds the stacking layout for the Jenga instruction: layers of items that turn 90 degrees each layer.

Constructors​

MemberWhat it is
JengaStackingInstructionSetup()Creates a JengaStackingInstructionSetup with default values.

Fields​

1 private and internal field
MemberWhat it is
private JengaStackingInstruction instructionsThe instruction being set up.

Methods​

MemberWhat it is
protected override void Setup(Bounds bounds, JengaStackingInstruction instructions)Works out how many items fit per layer both ways and fills Positions layer by layer.
2 private and internal methods
MemberWhat it is
private Vector3 GetBoundsSize(Quaternion rotation)Returns the item's bounds size after a rotation, with positive X and Z.
private Vector3 SetupPosition(Quaternion rotation, JengaStackingInstructionSetup.Level level, Vector3 boundsSize, Vector3 origin)Returns the corner start position for a layer.