mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
28 lines
609 B
C#
28 lines
609 B
C#
using BehaviorDesigner.Runtime;
|
|
using BehaviorDesigner.Runtime.Tasks;
|
|
|
|
namespace MoleMole
|
|
{
|
|
[TaskCategory("Ability")]
|
|
public class GetAnimatorInteger : Action
|
|
{
|
|
public string AnimatorInteger;
|
|
|
|
public SharedInt SharedInteger;
|
|
|
|
private BaseMonoAnimatorEntity _animatorEntity;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
BaseMonoEntity component = GetComponent<BaseMonoEntity>();
|
|
_animatorEntity = (BaseMonoAnimatorEntity)component;
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
SharedInteger.SetValue(_animatorEntity.GetLocomotionInteger(AnimatorInteger));
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
}
|