(client) chore:将图片包加载添加包ID区分

This commit is contained in:
m0_75251201
2025-07-21 16:17:12 +08:00
parent 28ddcda9a0
commit 506d0a68a8
3 changed files with 55 additions and 30 deletions

View File

@ -30,9 +30,7 @@ namespace Entity
}
private bool _isPlayerControlled = false;
private const int WarningInterval = 5000;
private int _warningTicks = 0;
private bool _warning = false;
public void Tick()
{
@ -85,13 +83,11 @@ namespace Entity
currentJob = aiTree.GetJob(this);
if (currentJob == null)
{
if (_warningTicks<=0)
if (!_warning)
{
Debug.LogWarning($"{GetType().Name}类型的{name}没有分配到任何工作,给行为树末尾添加等待行为,避免由于没有工作导致无意义的反复查找工作导致性能问题");
_warningTicks += WarningInterval;
_warning = true;
}
_warningTicks--;
return;
}
currentJob.StartJob(this);