fgm24/Assets/Scripts/Enemy/EnemyAnimationHandler.cs

24 lines
467 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyAnimationHandler : MonoBehaviour
{
Animator animator;
void Start()
{
animator = GetComponentInChildren<Animator>();
if (animator != animator.enabled)
animator.enabled = true;
}
public void Strangle()
{
animator.SetTrigger("Die");
}
public void Die()
{
animator.SetTrigger("Die");
}
}