private void StartRound(GameRoundModel roundModel) { _currentGameRoundModel = roundModel; ResetRound(); ApplyPlayerModelsToController(roundModel); _gameRoundUIController.DrawPlayersPanels(); }
private void ApplyPlayerModelsToController(GameRoundModel roundModel) { foreach (PlayerType playerType in _playerControllers.Keys) { PlayerModel model = roundModel.GetPlayerByType(playerType); model.Start(); GetPlayerController(playerType).PlayerModel = model; } }
public static GameRoundModel Create(GameType gameType, Data gameSettings) { bool withBuffs = gameType == GameType.WITH_BUFFS; GameRoundModel result = new GameRoundModel(); for (int i = 0; i < gameSettings.settings.playersCount; i++) { PlayerType playerType = GetPlayerTypeByIndex(i); PlayerModel player = CreatePlayerModel(gameSettings, playerType, withBuffs); result.AddPlayer(playerType, player); } return(result); }
public void CreateRound(GameType gameType) { GameRoundModel gameRoundModel = GameRoundFactory.Create(gameType, _dataConfig); StartRound(gameRoundModel); }