public static void DrawGame(PaintEventArgs args, Game game, Dictionary <string, Bitmap> textures, int distance, Map map) { args.Graphics.FillRectangle(Brushes.White, 0, 0, args.Graphics.DpiX, args.Graphics.DpiY); //args.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; game.CastRays(); DrawPlayerView(args, game, textures, distance); DrawRays(game, args); DrawRayScreenWall(map, args); DrawPlayer(map, args, game.PlayerPos); DrawAim(args); }
private void DrawGame(Game game, Dictionary <string, Bitmap> textures, int distance, int heights, Map map) { Paint += (sender, args) => { Location = new Point(400, 0); args.Graphics.FillRectangle(Brushes.White, 0, 0, ClientSize.Width, ClientSize.Height); args.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; game.CastRays(); Drawer.DrawPlayerView(args, game, textures, distance, heights); Drawer.DrawRays(game, args); Drawer.DrawRayScreenWall(map, args); Drawer.DrawPlayer(map, args, game.PlayerPos); Drawer.DrawAim(args); }; }