Slingin Macros

Made in Unity with HurricaneVR

Game Loop System

Our game uses a game loop system that increments the current round once all customers are spawned based upon the current round count.

Rounds

Game Round System C# code

Inspector
Properties for GameRoundSystem.
Code

Processes the current round and how many customers are left to spawn.
Code

Helper functions for managing the game round system.
Code

Customer AI

Customers chose a path to follow from an array of paths attached to the spot they randomly spawned to.

Customer AI

CustomerBehavior C# code

Properties for managing customer behavior.
Code


OnTriggerEnter - Processes Customer interaction with thrown food.
FixedUpdate - Points the customer towards the next position on their path and rotates the customer smoothly.
Code


InitOrRefresh - Resets or begins customer behavior to go down a path.
DespawnSatisfied/DespawnEnraged - Used to return customer to object pool and update game-loop data.
Code


EntitySpawner C# code

Properties for managing customer spawning.
Code


Spawns customer from object pool or creates new customer at a random "lane" and assigns a path to them.
Code


Functionality for despawning customers, playing animations, and processing object pool references.
Code

SpawnerSpot C# code

Stores paths for Customers to chose from when spawning.
Inspector
Code

LanePath C# code

Stores the start and end point of a path for a Customer to navigate using AI navigation.
Inspector
Code

Audio, UX, and UI Implementation

Custom systems were designed to implement Audio into the game and UX/UI elements for keeping track of the game status.

Health Jar

Audio

Sound Manager C# code

Plays music on awake and manages music volume with slider input.
Inspector Panel
Code

UX

Mesh Health Indicator C# code

Inspector
MeshHealthIndicator Properties.
Code
Mesh swapping functions.
Code
Health management functions.
Code

UI

RoundUISystem C# code

Inspector
Updates the UI text for the round count.
Code