/// <summary> /// Constructor. /// </summary> public GameplayScreen([NotNull] GameStartParameters gameStartParameters, InputState inputState) { this._gameStartParameters = gameStartParameters ?? throw new ArgumentNullException(nameof(gameStartParameters)); this.TransitionOnTime = TimeSpan.FromSeconds(1.5); this.TransitionOffTime = TimeSpan.FromSeconds(0.5); this._scoreKeeper = new ScoreKeeper.ScoreKeeper(); this._gameInput = new GameInput(inputState); this._livesRemaining = this._gameStartParameters.CountOfLives - 1; this._content = new ContentManager(GlobalServices.Game.Services, GlobalServices.Game.Content.RootDirectory); VolumeControl.Instance.LoadState(); }
public ChromaTower(IScoreKeeper scoreKeeper, IPlayerState playerState, IDifficulty difficulty) { GameState = GameState.Idle; if (scoreKeeper == null || playerState == null || difficulty == null) { throw new Exception("Score Keeper, Player State or the Difficulty cannot be null."); } this.scoreKeeper = scoreKeeper; this.playerState = playerState; this.difficulty = difficulty; }
public BowlingGame() { for (int i = 0; i < _frames.Length; i++) { _frames[i] = new Frame(); } _currentFrame = 0; _currentRoll = 0; _scoreKeeper = new ScoreKeeper(); }
private void PrepareEngine() { playerHealth = new PlayerHPStaticRate(maxHP: playerMaxHP, damageRate: damageRate, regenRate: regenRate); playerState = new PlayerState(playerHealth); scoreKeeper = new PlayerPrefScoreKeeper(); difficulty = new Difficulty(playerState: playerState, maxSlots: colorCount, introPlatforms: introPlatformCount, almostDeadLimit: nearDeathRatio); tower = new ChromaTower(scoreKeeper, playerState, difficulty); }
public void Setup() { _dataFactory = new Mock<IDataFactory>(); _scoreKeeper = new ScoreKeeper(_dataFactory.Object); }
public HighscoresController(IScoreKeeper scoreKeeper) { _scoreKeeper = scoreKeeper; }
/// <summary> /// Constructor. /// </summary> /// <param name="maximumRounds">How many rounds the game will have.</param> public MatchFacade(int maximumRounds) { _roundKeeper = new RoundKeeper(maximumRounds); _scoreKeeper = new ScoreKeeper(); }
public ProfileController(IDataFactory dataFactory, IScoreKeeper scoreKeeper) { _dataFactory = dataFactory; _scoreKeeper = scoreKeeper; }
public void SetScoreKeeper(IScoreKeeper scoreKeeper) { _scoreKeeper = scoreKeeper; }