Пример #1
0
        public static void render_all(Button button, Form_TD.CursorState cursorState, int quality)
        {
            Bitmap   bmp = new Bitmap(button.Width, button.Height);
            Graphics g   = Graphics.FromImage(bmp);

            if (cursorState == Form_TD.CursorState.newGem)
            {
                render_aspects(g, quality);
            }
            else
            {
                render_quality(g);
            }

            button.Image = bmp;
            button.Refresh();
        }
Пример #2
0
        public static void render_all(Button button, Form_TD.CursorState cursorState, Gem selected_gem)
        {
            Bitmap   bmp = new Bitmap(button.Height, button.Width);
            Graphics g   = Graphics.FromImage(bmp);

            render_background(g);
            render_paths(g);
            render_towers(g);
            render_gems(g, selected_gem);
            render_monsters(g);
            render_orb(g);
            render_shots(g);

            if (cursorState == Form_TD.CursorState.tower)
            {
                render_tower_overlay(g);
            }

            g.DrawString("ticks: " + Game.world.ticks, new Font(FontFamily.GenericSansSerif, 15, FontStyle.Regular), new SolidBrush(Color.Black), 10, 500);

            button.Image = bmp;
            button.Refresh();
        }