2024-02-03 10:52:24 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class EnemyAnimationHandler : MonoBehaviour
|
|
|
|
{
|
|
|
|
Animator animator;
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
animator = GetComponentInChildren<Animator>();
|
2024-02-03 21:31:14 +01:00
|
|
|
if (animator != animator.enabled)
|
|
|
|
animator.enabled = true;
|
2024-02-03 10:52:24 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
public void Strangle()
|
|
|
|
{
|
2024-02-03 21:31:14 +01:00
|
|
|
animator.SetTrigger("Die");
|
2024-02-03 10:52:24 +01:00
|
|
|
}
|
|
|
|
public void Die()
|
|
|
|
{
|
|
|
|
animator.SetTrigger("Die");
|
|
|
|
}
|
|
|
|
}
|