Files
zeling_v2/Assets/Scripts/Enemies/AI/BD_EnterPhase.cs
2026-05-12 15:34:08 +08:00

32 lines
822 B
C#
Raw 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.
#if GRAPH_DESIGNER
using Opsive.BehaviorDesigner.Runtime.Tasks;
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
using BaseGames.Enemies;
namespace BaseGames.Enemies.AI
{
/// <summary>
/// BD ActionBoss 切换阶段Phase
/// 调用 BossBase.EnterPhase(PhaseIndex),单帧完成,返回 Success。
/// </summary>
public class BD_EnterPhase : Action
{
[UnityEngine.SerializeField] private int m_PhaseIndex = 1;
private BossBase _boss;
public override void OnStart()
{
_boss = GetComponent<BossBase>();
}
public override TaskStatus OnUpdate()
{
if (_boss == null) return TaskStatus.Failure;
_boss.EnterPhase(m_PhaseIndex);
return TaskStatus.Success;
}
}
}
#endif