Examples
Examples
The package includes three example scenes built on Duck Shooter, a small arcade space shooter. You fly a ship along the bottom of the screen and shoot waves of rubber ducks that shoot soap back at you. Each scene focuses on one part of the health system.
The full health flow: damage, health bars, death and respawn
One boss health fed by hitboxes with different multipliers
A small pickup system that heals and hurts
The scenes are in Glowing Rifts/Modular Health System/Example/DuckShooter. Move the mouse to steer, and use the shoot input to fire.
Note
The example scripts start with DS and are only there to drive the demo. The health parts are the package’s own components.
📁 Shared Example Scripts
| Script | Role |
|---|---|
DSGameManager | Starts the game and respawns the player after death |
DSPlayerController | Moves the ship with the mouse and raises the shoot events |
DSGun | Fires projectiles from a spawn point at random intervals while shooting |
DSProjectile | Flies forward and hurts the first Hitbox it hits |
DSSoap | The ducks’ projectile, capped in count |
DSWave | Spawns a prefab per formation point, then the next wave once all are dead |
DSDuck | Flies a duck to its formation slot and tints it |
DSSpawner, DSHover | Random spawn positions and a hovering motion |
Tip
Open DSProjectile to see the smallest way to deal damage: find a Hitbox on what you hit and call Hurt.