示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Rectangle resolution = Screen.PrimaryScreen.Bounds;

            // Initialize Game
            //myGame.Resolution = new Size(resolution.Width, resolution.Height);
            GameSingleton.instance.Game.Resolution = new Size(this.MaximumSize.Width, this.MaximumSize.Height);

            // Initialize & Start GameLoop
            gameLoop = new GameLoop(this);
            gameLoop.Load();
            gameLoop.Start();

            // Start Graphics Timer
            graphicsTimer.Start();
        }
示例#2
0
文件: Program.cs 项目: kridy/Snaky
        public GameEngine(Game game, ConsoleDisplay display)
        {
            if (game == null)
                throw new ArgumentNullException("game");

            m_game = game;

            if (display == null)
                throw new ArgumentNullException("display");

            m_display = display;

            m_gameLoop = new GameLoop(new InterpolatedLoop());
        }