(client) chore:将图片包加载添加包ID区分
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user