You must log in or register to comment.
Great. Now that my code is self-documenting it is somehow also not legible?
Make up your damn minds, peeps!
public class GameManager : MonoBehaviour { public bool EnableHighContrast; public bool PlayerWon; public float PlayerUnitsMoved; public int PlayerDeathCount; public float PlayerHealth; public void PlayerTakeDamage(float damage) { PlayerHealth -= damage; if (PlayerHealth < 0) { PlayerDieAndRespawn(); } } public void PlayerDieAndRespawn() { return; } }
I couldn’t contain myself.
Should it be
PlayerHealth <= 0
?
Otherwise the player could have 0 health and not die? I’m sleep deprived so forgive me if I’m wrong
You are correct.
Counting this meme as my first FOSS contribution