Skip to content
Aidan Mathieu edited this page Apr 14, 2026 · 1 revision

The OrderUIManager script is used to create show and create demand for the user. This script handles both the UI and generations of orders.

Ienumerator Generate Orders Loop

This coroutine is used to generate random orders. The generation of orders is set beforehand using the Stage Controller in the level design. This loop will call the BuildRandomOrder() function which will generate a random order using what was set with the SetAutoGenerateStats() function.

Rebuild Order List

This function is called to generate the list for the user to see the orders in the UI. It goes through each of the current orders and calls AddOrderRow() for each of them.

##Attempt Complete Order

When the user clicks the button on the UI to try to complete one of the orders and sell the bottle packages it calls this function for that order. It then checks if the user has created enough bottles. If so, it will remove that number of stored bottles, determine if it was sold on time, and then use the PointsTracker script to add money to the user based on the bottles that they sold. It will also call the Data Collector object to track the attempt at selling the order and whether it was successful or not.

##IncreaseXPackHeld

These functions are called by the robot arms to increase the number of stored packages that are available to be held.

Clone this wiki locally