/// <summary> /// Inicializa el estado de este enemigo. /// </summary> /// <param name="playerController">La referencia a un objeto Player Controller.</param> public void Initialize(PlayerController playerController) { _enemyStateMachine = new EnemyStateMachine(); _enemyStateMachine.Initialize(this, playerController); }
private void Awake() { EnemyCombatManager = GetComponent <EnemyCombatManager>(); EnemyStateMachine = GetComponent <EnemyStateMachine>(); EnemyBehavior = GetComponent <EnemyBehavior>(); }
public EnemyController() { this.currentStateMachine = new EnemyStateMachine(this); GameApplication.Instance.GetService <IEnemyService>().PlayerSpotted += this.StartChasing; GameApplication.Instance.GetService <IStateMachineService>().OnEnterGameOverScene += OnGameOver; }