Пример #1
0
 public void DrawStats(GameStatistic gameStatistic)
 {
     spriteBatch.Begin();
     spriteBatch.DrawString(gameStatFont, "Level: " + gameStatistic.Level, new Vector2(30, 30), Color.Black);
     spriteBatch.DrawString(gameStatFont, "Score: " + gameStatistic.Score, new Vector2(160, 30), Color.Black);
     spriteBatch.DrawString(gameStatFont, "Lives: " + gameStatistic.Lives, new Vector2(290, 30), Color.Black);
     spriteBatch.End();
 }
Пример #2
0
        public WorldState(
            List <Critter> critters,
            List <BackgroundObject> backgroundObjects,
            List <Landscape> landscape,
            List <Item> items,
            Character character)
        {
            GameStatistic     = new GameStatistic(3);
            Critters          = critters;
            BackgroundObjects = backgroundObjects;
            Landscape         = landscape;
            Items             = items;
            Character         = character;

            WorldPosition = 0;
        }
Пример #3
0
 public GameState(uint noOfLives)
 {
     RunState      = RunStateType.Starting;
     ProgressState = GameStateType.InProgress;
     GameStatistic = new GameStatistic(noOfLives);
 }