34 lines
No EOL
699 B
C#
34 lines
No EOL
699 B
C#
using NaughtyAttributes;
|
|
using UnityEngine;
|
|
|
|
namespace KitsuneCafe.Animation
|
|
{
|
|
public class TriggerAnimation : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Animator animator;
|
|
|
|
[SerializeField, AnimatorParam("animator")]
|
|
private int parameter;
|
|
|
|
private void Reset()
|
|
{
|
|
animator = GetComponent<Animator>();
|
|
}
|
|
|
|
public void Trigger(string parameter)
|
|
{
|
|
animator.SetTrigger(parameter);
|
|
}
|
|
|
|
public void Trigger(int parameter)
|
|
{
|
|
animator.SetTrigger(parameter);
|
|
}
|
|
|
|
public void Trigger()
|
|
{
|
|
animator.SetTrigger(parameter);
|
|
}
|
|
}
|
|
} |