Files
SoulliesOfficial 649b7a5ddc 更新
2026-05-23 08:27:50 -04:00

21 lines
694 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Opsive.BehaviorDesigner.Runtime.Tasks;
using Opsive.Shared.Utility;
using UnityEngine;
namespace Cielonos.MainGame.Characters.AI
{
[Description("尝试申请攻击令牌。成功返回 Success令牌已满返回 Failure。")]
[Category("Cielonos")]
public class TryAcquireAttackToken : AutomataConditionalBase
{
[Tooltip("要申请的令牌类型。")]
public AttackTokenType tokenType = AttackTokenType.MeleeAttack;
public override TaskStatus OnUpdate()
{
bool acquired = CombatManager.CoordinatorSm.TryAcquireToken(self, tokenType);
return acquired ? TaskStatus.Success : TaskStatus.Failure;
}
}
}