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 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 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); }