You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
619 B
24 lines
619 B
using BehaviorDesigner.Runtime.Tasks;
|
|
using GAS.Runtime;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
/// <summary>
|
|
/// 释放AI选择到的主动技能
|
|
/// </summary>
|
|
public class DoAbilityAction : Action
|
|
{
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
var ownerEnt = Owner.GetEntity<CombatEntity>();
|
|
var ai = ownerEnt.aI;
|
|
|
|
if (ai.abilitySeq == 0)
|
|
return TaskStatus.Success;
|
|
|
|
ownerEnt.abilitySystem.TryActivateAbility_WithSeq(ai.abilitySeq);
|
|
ai.abilitySeq = 0;
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
}
|