예제 #1
0
 private Battle(IBattlePresenter presenter, IPlayer gamer, IPlayer enemy, IList <BattleCharacter> characters)
 {
     _presenter = presenter;
     _players   = new Dictionary <BattleSide, IPlayer> {
         { BattleSide.Gamer, gamer }, { BattleSide.Enemy, enemy }
     };
     Characters = new LoopingSequence <BattleCharacter>(characters.ToList());
 }
예제 #2
0
    private IEnumerator _Battle(PlayerData playerData)
    {
        yield return(_SwitchScene(SceneEnum.Battle));

        var enemiesData = _CreateEnemiesData();

        var battlePanel = FindObjectOfType <BattlePanel>();

        battlePanel.Initialize(_gameData, playerData, enemiesData);
        IBattlePresenter battlePresenter = battlePanel.BattlePresenter;

        yield return(battlePresenter.Run());

        GameUtility.Instance.Save();
    }
예제 #3
0
 public void Initialize(GameData gameData, PlayerData playerData, Dictionary <int, EnemyData> enemiesData)
 {
     _battleView.Initialize(gameData, _infoView);
     BattlePresenter = new BattlePresenter(_battleView, playerData, enemiesData, gameData) as IBattlePresenter;
 }