Example #1
0
        public TestGame()
            : base()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreparingDeviceSettings       += new EventHandler <PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
            graphics.PreferredBackBufferWidth       = 1920;
            graphics.PreferredBackBufferHeight      = 1080;
            graphics.SynchronizeWithVerticalRetrace = !false;
            graphics.IsFullScreen = false;

            Content.RootDirectory = "Content";

            IsMouseVisible  = true;
            IsFixedTimeStep = false;
            //TargetElapsedTime = TimeSpan.FromSeconds(1f / 30f);
            DisplayUI = true;

            Kernel = NinjectKernel.Instance;
            NinjectKernel.BindGame(this);

            previousKeyboard = Keyboard.GetState();

            framerate = new StreamWriter(File.OpenWrite("framerate.csv"));
            Exiting  += new EventHandler <EventArgs>(TestGame_Exiting);
        }