Player Animations

This commit is contained in:
Walter
2026-02-01 15:34:36 -06:00
parent 7362c7f57e
commit 1a498ce99d
8 changed files with 94 additions and 36 deletions
+5 -1
View File
@@ -7,7 +7,8 @@ using UnityEngine;
public class PlayerStressController : MonoBehaviour
{
public PlayerPickupController pickupController;
private Animator animator;
[Header("Stress Settings")]
public float currentStress = 0f;
public float maxStress = 100f;
@@ -25,6 +26,7 @@ public class PlayerStressController : MonoBehaviour
void Start()
{
animator = GetComponent<Animator>();
// Start the repeating loop
StartCoroutine(StressCheckLoop());
}
@@ -76,6 +78,8 @@ public class PlayerStressController : MonoBehaviour
{
isPanicking = true;
animator.SetBool("isCollapsed", true);
Debug.Log("Player is freaking out man!");
// Add effects like screen shake or slowing down the player here
OnPlayerPanic?.Invoke(); // Trigger the panic event