Posted August 26, 2023 by Flynn Delta
This self-study combines a few different aspects of previous self-studies and tutorials to create a proper game loop:
Enemies now spawn on their own at two different locations (red x), rather than through clicking the environment. I've reverted the camera back to behind the player and walled off the ProBuilder arena so the player can't run off into the hills to escape enemies.
When enemies touch the player by entering the player's trigger, the player loses one point of health (represented at the bottom of the screen.
When the player touches a health pack, they gain a health point back.
When you run out of health points, you lose. The player movement script is disabled once you lose, which caused an unexpected death "animation" I decided to leave in.
Insert Tom & Jerry scream
Here's a video of full gameplay: