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()); }
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(); }
public void Initialize(GameData gameData, PlayerData playerData, Dictionary <int, EnemyData> enemiesData) { _battleView.Initialize(gameData, _infoView); BattlePresenter = new BattlePresenter(_battleView, playerData, enemiesData, gameData) as IBattlePresenter; }