36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
|
using Opsive.GraphDesigner.Runtime;
|
|
using Opsive.Shared.Utility;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Characters.AI
|
|
{
|
|
[Description("设置当前敌人的 Formation 职责。后续 CheckSector/AcquireSector 可选择使用该动态职责。")]
|
|
[NodeIcon("Assets/Sprites/Icon/Gears.png")]
|
|
[Category("Cielonos")]
|
|
public class SetFormationRole : AutomataActionBase
|
|
{
|
|
[Tooltip("敌人的战术职责。")]
|
|
public FormationTacticalRole role = FormationTacticalRole.ActiveMelee;
|
|
|
|
[Tooltip("申请 Action Sector 或 Free Area。")]
|
|
public FormationSectorPurpose purpose = FormationSectorPurpose.Action;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
behaviorSc.formationRole = role;
|
|
behaviorSc.formationPurpose = purpose;
|
|
behaviorSc.formationUseRadiusConstraint = false;
|
|
behaviorSc.formationMinRadius = 0f;
|
|
behaviorSc.formationMaxRadius = 0f;
|
|
return TaskStatus.Success;
|
|
}
|
|
|
|
public override void Reset()
|
|
{
|
|
role = FormationTacticalRole.ActiveMelee;
|
|
purpose = FormationSectorPurpose.Action;
|
|
}
|
|
}
|
|
}
|