update babe
This commit is contained in:
@@ -121,7 +121,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
private NodeState ActionPatrol()
|
||||
{
|
||||
Debug.Log("Patrolling...");
|
||||
// Debug.Log("Patrolling...");
|
||||
agent.isStopped = false; // Đảm bảo NPC được phép di chuyển
|
||||
agent.speed = moveSpeed * 0.5f; // Đi dạo nên đi chậm lại một chút
|
||||
|
||||
@@ -154,7 +154,7 @@ public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
if (player == null) return NodeState.Failure;
|
||||
|
||||
Debug.Log("Chasing Player");
|
||||
// Debug.Log("Chasing Player");
|
||||
|
||||
agent.isStopped = false;
|
||||
agent.speed = moveSpeed; // Phục hồi tốc độ rượt đuổi
|
||||
@@ -167,7 +167,7 @@ public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
if (player == null) return NodeState.Failure;
|
||||
|
||||
Debug.Log("Focus and Shoot!");
|
||||
// Debug.Log("Focus and Shoot!");
|
||||
|
||||
// Dừng NavMeshAgent lại để đứng bắn, tránh bị trượt
|
||||
agent.isStopped = true;
|
||||
@@ -196,7 +196,7 @@ public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
if (laserPrefab == null || firePoint == null) return;
|
||||
Instantiate(laserPrefab, firePoint.position, firePoint.rotation);
|
||||
Debug.Log("Laser Shot!");
|
||||
// Debug.Log("Laser Shot!");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user