LiamMcKenzie / ScaredKrow

ScaredKrow is a game made for the third year "ID737001 Game Development" paper at Otago Polytechnic
MIT License
2 stars 2 forks source link

Add player health system #33

Closed DevonHenderson closed 5 months ago

DevonHenderson commented 5 months ago

Description:

This PR adds the basics of the player health system.

Branch: Devon/Player-HP

Fixes Issue:

Scene: Scenes/Player Health

New player prefab linked in scene GameManager: Prefabs/Player/Player (HEALTH)

Changes required in other PRs

Comments in the PlayerHealth script for what is required for it to function and where the future changes need to be: image

image

Also as there is some repetitive but short code, I have made the if statements as single line statements to improve readability

image image

Video Demonstration

Apologies for video resolution, had to compress file multiple times to fit on Github :)

Demo 1: For the purpose of showing the random removal of clothing I have set the intitial game bools to all be true (4 health). The game only ends when all these bools are false and the player gets hit by the crow again

https://github.com/LiamMcKenzie/ScaredKrow/assets/90590089/4e6c568f-6fad-40ca-8ee0-7dc33834be32

Demo 2: Game 1: shows the tracked health value and what happens with enabling and disabling bools during runtime. Game 2: shows that health starts at 1 on a new game/reset

https://github.com/LiamMcKenzie/ScaredKrow/assets/90590089/a390bfc9-c0d3-4dbe-b3bb-01d902f86cbb