public BonusesPopulationController(int maxBonusesCount, World world, IEnumerable<Point> bonusesGenerationPoints) { World = world; MaxBonusesCount = maxBonusesCount; BonusesGenerationPoints = new List<Point>(bonusesGenerationPoints); }
public EnemiesPopulationController(int maxEnemiesCount, World world, IEnumerable<Point> enemiesGenerationPoints) { World = world; MaxEnemiesCount = maxEnemiesCount; EnemiesGenerationPoints = new List<Point>(enemiesGenerationPoints); }
public LevelScene(MainMenuScene owner) { _world = new World(); _worldView = new WorldView(_world); _mainMenuScene = owner; }
private void DrawWorldEvents(Canvas2D canvas, World world) { DrawBonusBoom(canvas, world); DrawGameOver(canvas, world); DrawPlayerLife(canvas, world); DrawPlayerScore(canvas, world); DrawLevelInfo(canvas, world); }
public WorldView(World world) { World = world; }
private void DrawPlayerScore(Canvas2D canvas, World world) { float scoresHeight = (world.Height * TileSize) - HalfTileSize; string text = "Score " + World.Player.Score.Count; Vector textSize = canvas.MeasureString(Fonts.Instance.TanksSmallFont, text); canvas.DrawString(Fonts.Instance.TanksAltFont, new Vector(TileSize, World.Height * TileSize - HalfTileSize), text, ColorU.White); }
private void DrawTempEvent(Canvas2D canvas, World world, string text) { Vector textSize = canvas.MeasureString(Fonts.Instance.TankBigFont, text); canvas.DrawString(Fonts.Instance.TankBigFont, (canvas.Size - textSize) / 2, text, ColorU.Yellow); }
private void DrawPlayerLife(Canvas2D canvas, World world) { float extrasHeight = (world.Height * TileSize) - HalfTileSize; string text = "Life " + World.Player.Life.Count; Vector textSize = canvas.MeasureString(Fonts.Instance.TanksSmallFont, text); canvas.DrawString(Fonts.Instance.TanksAltFont, new Vector((world.Width * TileSize - HalfTileSize) - textSize.X, extrasHeight), text, ColorU.White); }
private void DrawLevelInfo(Canvas2D canvas, World world) { float extrasHeight = TileSize - HalfTileSize; string text = "Level " + World.WorldState.LevelNumber; Vector textSize = canvas.MeasureString(Fonts.Instance.TanksSmallFont, text); canvas.DrawString(Fonts.Instance.TanksAltFont, new Vector(((world.Width / 2) * TileSize) + textSize.X, extrasHeight), text, ColorU.White); }
private void DrawGameOver(Canvas2D canvas, World world) { if (World.Player.Life.Count == 0) { DrawTempEvent(canvas, world, "GAME OVER"); } }
private void DrawBonusBoom(Canvas2D canvas, World world) { if (World.WorldState.BonusExplosion) { m_renderer.ActivateShackeEffect(WorldRenderer.ShakeStrength * 5, WorldRenderer.ShakeMinimizingSpeed + WorldRenderer.ShakeMinimizingSpeed); } }
public WorldState(World world) { World = world; LevelNumber = 1; }