예제 #1
0
        public static void Init(Form form)
        {
            Graphics g;

            _context   = BufferedGraphicsManager.Current;
            g          = form.CreateGraphics();
            Width      = form.ClientSize.Width;
            Heigth     = form.ClientSize.Height;
            _buffer    = _context.Allocate(g, new Rectangle(0, 0, Width, Heigth));
            _form      = form as MainGameForm;
            _formColor = _form.GetColor();
            Load();
        }
예제 #2
0
        static void Main()
        {
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);

            Form form = new MainGameForm();

            form.Width  = 800;
            form.Height = 600;
            Game.Init(form);
            form.Show();
            Game.Draw();
            Application.Run(form);
        }