diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 9b6a280..a642c0d 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -7,6 +7,7 @@ using UnityEditor; public class PlayerController : MonoBehaviour { + [Header("Keybinds")] public KeyCode forwardKey = KeyCode.W; public KeyCode backwardKey = KeyCode.S; @@ -25,8 +26,6 @@ public class PlayerController : MonoBehaviour public KeyCode dashKey = KeyCode.LeftShift; public bool canDash = true; public float dashCooldownTimer = 0f; - - [Header("Particles")] public ParticleSystem particleSystem; public Transform particleTransform; @@ -35,6 +34,7 @@ public class PlayerController : MonoBehaviour public string enemyTag = "Enemy"; public float invulnerabilityTimeSeconds = 0.25f; public int lives = 3; + public ParticleSystem bloodParticleSystem; [Header("Audio")] public AudioSource metalPipe; @@ -124,16 +124,19 @@ public class PlayerController : MonoBehaviour void HandlePlayerHit() { - lastHit = Time.time; - metalPipe.Play(); // Play damage sound effect - lives--; - // Update visual feedback (if any) for losing a life, e.g. hearts - if (lives <= 0) { ExitGame(); } + + bloodParticleSystem.Play(); + + lastHit = Time.time; + metalPipe.Play(); // Play damage sound effect + + + // Update visual feedback (if any) for losing a life, e.g. hearts } void ExitGame()