You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
625 B
C#
17 lines
625 B
C#
using UnityEngine;
|
|
namespace MalbersAnimations.Utilities
|
|
{
|
|
[AddComponentMenu("Malbers/Utilities/Animator/Blink Eyes")]
|
|
|
|
public class BlinkEyes : MonoBehaviour, IAnimatorListener
|
|
{
|
|
[RequiredField] public Animator animator;
|
|
public string parameter = "Eyes";
|
|
|
|
/// <summary>This method is called by animation clips events, this will open an close the animal eyes</summary>
|
|
public virtual void Eyes(int ID) => animator.SetInteger(parameter, ID);
|
|
|
|
public virtual bool OnAnimatorBehaviourMessage(string message, object value) => this.InvokeWithParams(message, value);
|
|
}
|
|
}
|