mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
28 lines
473 B
C#
28 lines
473 B
C#
using BehaviorDesigner.Runtime.Tasks;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class SetAIAnimatorInt : Action
|
|
{
|
|
public string intName = string.Empty;
|
|
|
|
public int value;
|
|
|
|
private BaseMonoAnimatorEntity _entity;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
_entity = GetComponent<BaseMonoAnimatorEntity>();
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
if (_entity.IsActive())
|
|
{
|
|
_entity.SetLocomotionInteger(intName, value);
|
|
}
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
}
|