コード例 #1
0
ファイル: GameModel.cs プロジェクト: lightmg/RunnerGame
 public GameModel(IEnemyFactory enemyFactory, GameFieldSize gameFieldSize,
                  Dictionary <PlayerState, GameObjectSize> playerSizesByStates)
 {
     Console.WriteLine($"Starting game with field {gameFieldSize.Width}x{gameFieldSize.Height} size");
     this.enemyFactory        = enemyFactory;
     this.gameFieldSize       = gameFieldSize;
     this.playerSizesByStates = playerSizesByStates;
     Reset();
     State.PlayerAlive = false;
 }
コード例 #2
0
ファイル: GameState.cs プロジェクト: lightmg/RunnerGame
 public GameState(GameFieldSize fieldSize, ulong score, double speed)
 {
     FieldSize = fieldSize;
     Score     = score;
     Speed     = speed;
 }