示例#1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (IntroScreen game = new IntroScreen())
     {
         game.Run();
     }
 }
        public IntroScreen()
        {
            Window.Title = "Wizards Never Die";
            instance = this;

            _graphics = new GraphicsDeviceManager(this);

            _graphics.PreferMultiSampling = true;
            #if WINDOWS || XBOX
            _graphics.PreferredBackBufferWidth = 1280;
            _graphics.PreferredBackBufferHeight = 720;
            ConvertUnits.SetDisplayUnitToSimUnitRatio(24f);
            IsFixedTimeStep = true;
            #elif WINDOWS_PHONE
            _graphics.PreferredBackBufferWidth = 800;
            _graphics.PreferredBackBufferHeight = 480;
            ConvertUnits.SetDisplayUnitToSimUnitRatio(16f);
            IsFixedTimeStep = false;
            #endif
            #if WINDOWS
            _graphics.IsFullScreen = false;
            #elif XBOX || WINDOWS_PHONE
            _graphics.IsFullScreen = true;
            #endif
            Content.RootDirectory = "Content";

            //new-up components and add to Game.Components
            ScreenManager = new ScreenManager(this);
            Components.Add(ScreenManager);

            FrameRateCounter frameRateCounter = new FrameRateCounter(ScreenManager);
            frameRateCounter.DrawOrder = 101;
            Components.Add(frameRateCounter);

            //added coordinates
            DisplayData displayInfo = new DisplayData(ScreenManager);
            displayInfo.DrawOrder = 101;
            Components.Add(displayInfo);
        }