Пример #1
0
 /// <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);
 }
Пример #2
0
 private void Awake()
 {
     EnemyCombatManager = GetComponent <EnemyCombatManager>();
     EnemyStateMachine  = GetComponent <EnemyStateMachine>();
     EnemyBehavior      = GetComponent <EnemyBehavior>();
 }
Пример #3
0
 public EnemyController()
 {
     this.currentStateMachine = new EnemyStateMachine(this);
     GameApplication.Instance.GetService <IEnemyService>().PlayerSpotted += this.StartChasing;
     GameApplication.Instance.GetService <IStateMachineService>().OnEnterGameOverScene += OnGameOver;
 }