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

24 lines
655 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 UnityEngine;
using Opsive.BehaviorDesigner.Runtime.Tasks;
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
namespace BaseGames.Enemies.AI
{
/// <summary>
/// BD Action瞬移传送到目标坐标Boss 专用。
/// 单帧直接修改 transform.position不使用导航。
/// </summary>
public class BD_TeleportTo : Action
{
[SerializeField] private Vector2 m_Target;
public override TaskStatus OnUpdate()
{
transform.position = new Vector3(m_Target.x, m_Target.y, transform.position.z);
return TaskStatus.Success;
}
}
}
#endif