Ejemplo n.º 1
0
 public void InitializeBattle(List <EnemyData> enemies, ActualTurn turn)
 {
     ControlManager.Instance.PlayerContext = PlayerContextType.InCombat;
     StatsManager.Instance.RecalculateStatsFromPlayer(); //loads stats + weapon
     _playerCombat = _combatUpdater.PlayerCombat;
     for (int i = 0; i < enemies.Count; i++)
     {
         if (enemies[i].TypeEnemy == TypeEnemy.Boss)
         {
             _bossBattle = true;
         }
         EnemyCombat ec = _combatUpdater.EnemiesSlots[i].GetComponent <EnemyCombat>();
         _enemiesInBattle.Add(i, ec);
         _enemiesInBattle[i].SetEnemyData(enemies[i], StatsManager.Instance.InfoPlayer.ActualLevel);
     }
     UIManager.Instance.ShowUIMainPanel(UIMainPanel.Combat);  //Combat panel -> 1st transit
     _actualTurn = turn;
 }
Ejemplo n.º 2
0
 public void InitializeBattle()
 {
     ControlManager.Instance.PlayerContext = PlayerContextType.InCombat;
     StatsManager.Instance.RecalculateStatsFromPlayer(); //loads stats + weapon
     _playerCombat  = _combatUpdater.PlayerCombat;
     _enemyAttacked = -1;
     for (int i = 0; i < _enemiesAddToBattle.Count; i++)
     {
         if ((int)_enemiesAddToBattle[i].TypeEnemy >= 100)
         {
             _bossBattle = true;
         }
         EnemyCombat ec = _combatUpdater.EnemiesSlots[i].GetComponent <EnemyCombat>();
         _enemiesInCombat.Add(ec);
         _enemiesAlive.Add(true);
         _enemiesInCombat[i].SetEnemyData(_enemiesAddToBattle[i], StatsManager.Instance.InfoPlayer.ActualLevel);
     }
     UIManager.Instance.ShowUIMainPanel(UIMainPanel.Combat);  //Combat panel -> 1st transit
     _actualTurn = _preloadTurn;
 }