Self Study 4
This week, we used our scene and some provided assets to create a basic game.
Copies of an enemy prefab were spawned repeatedly using the Unity Coroutine function, which is an easy way of setting repeat tasks. To track the player, enemies would find the object with the 'Player' tag in the scene and target its positon. Then, they would track it with using the code from the previous self study.
Enemies giving damage and dying
A script on the player checks, upon collision with a trigger colider of tag 'Enemy', calls a function to deduct health points and destroys the game object of the collider. When the health is adjusted, the script changes the UI Canvas text to match.
This interaction is very similar to the player-enemy interaction, except that health points are added.
The player dies and the game ends
When the player health reaches zero, it is deactivated. This triggers a function to activate a stationary camera overlooking the scene and some text over the screen.
UTAS KIT207 Portfolio
Portfolio content for the KIT207 Game Design and Production course
Status | In development |
Category | Other |
Author | Sutherwin |
More posts
- Tutorial 5Apr 13, 2024
- Self Study 5Apr 13, 2024
- Game IdeasApr 04, 2024
- Tutorial 3Mar 24, 2024
- Self Study 3Mar 22, 2024
- Tutorial 2Mar 22, 2024
- Self Study 2Mar 14, 2024
- Tutorial 1Mar 14, 2024
- Self Study 1Mar 07, 2024