using RR.Game2D.Behaviour; using RR.Game2D.Core; using UnityEngine; public class PlayerAnimationEvents : MonoBehaviour { private PlayerController _controller; private Rigidbody2D _rb; private void Awake() { _controller = GetComponent(); _rb = GetComponent(); } public void OnDeathEnd() { Animator animator = GetComponent(); animator.ResetTrigger("Death"); gameObject.layer = LayerMask.NameToLayer("Default"); _rb.constraints = RigidbodyConstraints2D.FreezeRotation; GameManager.Instance.RespawnPlayer(); } }