ChaseState fix

This commit is contained in:
Nikita Kruglickiy 2024-03-20 19:17:20 +03:00
parent 148e1e40e1
commit 8452581040
2 changed files with 2 additions and 7 deletions

View File

@ -51,10 +51,9 @@ namespace Characters.Enemy.States
_enemy.targetTransform = _enemy.GetClosestTarget();
}
else
{
_enemy.targetTransform = null;
if (!_enemy.HasTarget)
{
_enemy.ChangeState(EnemyState.Idle);
}
}

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Mirror;
using UnityEngine;
@ -53,8 +51,6 @@ namespace Level.BuildModules
DoorU2, DoorD2, DoorL2, DoorR2,
DoorU3, DoorD3, DoorL3, DoorR3
});
// Debug.Log(_doors.Count());
}
public override void OnStartClient()