Looterland

Made in Unity

Loot Pool and Item Spawning

Collectables are contained in ScriptableObjects that seperate groups of collectables for tiering.

The main level contains "Spawn Regions" which are used to detect the player and refresh collectables in that "Region".

Collectables


Collectable Collection Scriptable Object C# code

Stores a list of collectables.


Collectable C# code

Stores related data for each collectable such as it's ID, name, and cash value.


Also contains functionality for delaying pickup. This is used to delay picking up cash lost from getting hit by a guard.


Vanishing Collectables C# code

Collectable_Vanish is a script added to collectables that makes those collectables "blink" in and out of existance for a duration, then despawns them.


SpawnAreas Scriptable Object C# code

Stores each spawn position in a SpawnArea/Region for placing collectables into the scene.


Region C# code

Regions contain groups of collectables and spawn chance data for randomly spawning collectables in the area. They also contain position data for placing collectables in predetermined locations.



PlayerRegion C# code

PlayerRegion keeps track of the regions that are overlapping the player. Regions overlapping the player spawn collectables.

Hazards and Speed Boost

There are two types of "spill" hazards, a different effect is applied when walking over each type.

Pink spills are a sticky substance slow down both the Player and Guards.

Blue spills are a slippery liquid that restricts characters from changing their movement direction.

Yellow spills are spilled cans of Wizard Speed which are collectables that apply a speed effect to the player. Walking over this spill type applies that same speed boost effect.



Hazards C# code

Applies a hazard effect to a character with a CharacterHazardBehavior component.


CharacterHazardBehavior C# code

Properties used for managing hazard effects to be applied to a character.
Applies an effect to a character by altering the character's physics material. Also triggers related VFX and animations.
Defaults a character back to their original physics after the effect duration is spent.

VFX, Animations, and Audio

VFX, Animations, and Audio cues were implemented by myself, including connecting respective files to them.

Platform Types

VFX



Liquid Effect C# code

Spawns particle systems for a liquid effect on Play(), disables these effects on Stop(). Called by CharacterHazardBehavior.


Player Blink C# code

Spawns particle systems for a liquid effect on Play(), disables these effects on Stop().

Called by CharacterHazardBehavior.

Properties for PlayerBlink.


Untilizes a coroutine to "blink" the player in and out of existance for an invulnerability period duration. Used to protect the player from repeated "hits" by Gaurds.

Animations



Player Animator Controller Animator

Blends movement animations and transitions from any state to alternate animations based on boolean values.

Player Animation C# code

Manages the Player's animator variables to transition between Player animations.


The CharacterHazardBehavior script calls upon PlaySlip and PlayStick when colliding with a hazard.


Cop Animator Controller Animator

Blends movement animations and transitions from any state to alternate animations based on boolean values.

Cop Animation C# code

Manages Guard animator variables to transition between Guard animations.


The CopCollision script calls upon PlayAttack when a Guard is colliding with the Player.


The CharacterHazardBehavior script calls upon PlaySlip and PlayStick when colliding with a hazard.

Audio



Audio Source Inspector

Begins playing the music track and persists to new scenes.


Scene Persistance C# code

Preserves an instance of a gameObject through scenes.


Reduce Audio C# code

Changes the music track's volume when starting the game and when the pause menu is active.


Audio Container Scriptable Object C# code

Stores a collection of audio tracks to be pulled from randomly.


Audio Container Scriptable Object Inspector

An example of the Audio Container being used to store happy sound effects.
The PlayerCollision script randomly picks a sound effect and plays it when the Player picks up a high value item.