(client) feat:实现行为树条件节点的实际功能

This commit is contained in:
m0_75251201
2025-08-24 17:15:52 +08:00
parent da93368f02
commit 797cf69f75
17 changed files with 937 additions and 752 deletions

View File

@ -84,11 +84,15 @@ namespace Entity
{
IsChase = true;
currentJob = null;
if(Program.Instance.focusedEntity)
// 逻辑修改只有当存在一个不同的焦点实体时才将其PlayerControlled设为false
if (Program.Instance.focusedEntity && Program.Instance.focusedEntity != this)
{
Program.Instance.focusedEntity.PlayerControlled = false;
}
Program.Instance.focusedEntity = this;
}
else if (PlayerControlled)
// 逻辑修改:确保只有当自身是焦点实体时才取消焦点,避免不必要的逻辑执行
else if (Program.Instance.focusedEntity == this)
{
Program.Instance.focusedEntity = null;
}
@ -96,6 +100,7 @@ namespace Entity
get => Program.Instance.focusedEntity == this;
}
public bool IsWalking => _walkingTimer > 0;
/// <summary>