Files
zeling_v2/Assets/_Game/Scripts/AI/IEnemyLocomotion.cs
T

27 lines
1.1 KiB
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.
using UnityEngine;
namespace BaseGames.AI
{
/// <summary>移动执行器的行为模式。</summary>
public enum LocomotionMode { Idle, Patrol, Face, Approach }
/// <summary>巡逻策略(Patrol 模式下的具体走法)。</summary>
public enum PatrolStrategy { Wander, Pace, Waypoints }
/// <summary>
/// 敌人移动执行器的声明式接口。AI/能力只"声明意图",执行在实现内部完成
/// AI 不 actuate)。实现见 BaseGames.Enemies.EnemyLocomotion。
/// </summary>
public interface IEnemyLocomotion
{
void SetMode(LocomotionMode mode); // Idle(停) / Patrol(按配置策略游走)
void Approach(Transform target); // 持续跟随,派生 RunSpeed
void Pursue(Vector2 target); // 寻路逼近(RunSpeed):每帧朝 target 重寻路(底层防抖)
void MoveTo(Vector2 point); // 一次性目标点
void Face(Vector2 lookAt); // 停 + 朝向
void Stop();
LocomotionMode CurrentMode { get; }
bool IsMoving { get; }
}
}