添加mcp服务器
优化敌人AI,修改成双重规则寻敌
This commit is contained in:
@@ -162,5 +162,34 @@ namespace IndianOceanAssets.Engine2_5D
|
||||
}
|
||||
|
||||
public bool IsActive => _state != State.Idle;
|
||||
|
||||
// ===== 编辑器可视化 =====
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
// 绘制回声最大范围(青色线框)
|
||||
Gizmos.color = new Color(0f, 1f, 1f, 0.3f);
|
||||
Gizmos.DrawWireSphere(transform.position, maxRadius);
|
||||
|
||||
// 绘制当前波纹半径(如果在扩散中)
|
||||
if (_state != State.Idle && _radius > 0)
|
||||
{
|
||||
Gizmos.color = new Color(1f, 1f, 0f, 0.5f);
|
||||
Gizmos.DrawWireSphere(new Vector3(_center.x, transform.position.y, _center.y), _radius);
|
||||
|
||||
// 绘制波纹中心
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.DrawWireSphere(new Vector3(_center.x, transform.position.y, _center.y), 0.3f);
|
||||
}
|
||||
|
||||
// 绘制冷却时间指示
|
||||
if (Time.time < _lastEchoTime + cooldown)
|
||||
{
|
||||
float remaining = (_lastEchoTime + cooldown) - Time.time;
|
||||
float cooldownRatio = remaining / cooldown;
|
||||
|
||||
Gizmos.color = new Color(1f, 0f, 0f, 0.3f);
|
||||
Gizmos.DrawWireSphere(transform.position, maxRadius * cooldownRatio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user