mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
24 lines
585 B
C#
24 lines
585 B
C#
using BehaviorDesigner.Runtime.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class SetStateAnimatorPattern : Action
|
|
{
|
|
public string stateName;
|
|
|
|
public string animatorEventPatternName;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
BaseMonoAnimatorEntity component = GetComponent<BaseMonoAnimatorEntity>();
|
|
if (component is BaseMonoMonster)
|
|
{
|
|
BaseMonoMonster baseMonoMonster = component as BaseMonoMonster;
|
|
baseMonoMonster.SetSoleAnimatorEventPattern(Animator.StringToHash(stateName), animatorEventPatternName);
|
|
}
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
}
|