Beispiel #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();
        }
Beispiel #2
0
        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());
        }