Simple

Scene: DuckShooter_Simple

The simplest scene, showing the full health flow from a hit to a respawn. Waves of ducks fly in, you shoot them, and they shoot soap back at you.

  flowchart LR
    A[Projectile] --> B[Hitbox] --> C[Health] --> D[On Death]

A bullet deals 50, so a duck takes two hits. A soap deals 100, so one hit destroys the ship, unless it’s still invincible from spawning.

πŸš€ The Player Ship: DS_Player

ComponentSetup
Health100, Destroy On Death off
HitboxOn the root collider, multiplier 1
InvincibilityTurned on by the intro animation for 3 seconds after spawning
SpawnableEffectSpawns DS_ShipExplosion from On Death

DSGameManager listens to On Death, hides the ship, then brings it back after 2 seconds with ResetHealth().

πŸ¦† The Ducks: DS_Duck

ComponentSetup
Health100 on the root, Destroy On Death on
HitboxOn the duck model’s mesh collider, multiplier 1
HitpointShows the damage, from the hitbox’s On Hit
SpawnableEffectSpawns DS_DuckDeathEffect from On Death

The death effect uses a SoundGenerator for a random squeak and a DeathEffect to remove itself after 2 seconds.

Tip

Start here to see every piece of the system working together, then open the other scenes for the advanced setups.