Player Animations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user