24 lines
524 B
C#
24 lines
524 B
C#
using UnityEngine;
|
|
using UnityEngine.AI;
|
|
|
|
namespace Darkmatter.Presentation
|
|
{
|
|
public class EnemyMotor : MonoBehaviour
|
|
{
|
|
[SerializeField] NavMeshAgent enemyAI;
|
|
public Transform playerTransform;
|
|
|
|
[Header("Enemy Data")]
|
|
public float walkSpeed = 3f;
|
|
public float chaseSpeed = 5f;
|
|
public float visionRange = 15f;
|
|
public float attackRange = 2f;
|
|
|
|
private void Start()
|
|
{
|
|
enemyAI.SetDestination(playerTransform.position);
|
|
}
|
|
|
|
}
|
|
}
|