多轮审查和修复
This commit is contained in:
23
Assets/Scripts/Enemies/AI/BD_TeleportTo.cs
Normal file
23
Assets/Scripts/Enemies/AI/BD_TeleportTo.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user