當前位置: 首頁>>代碼示例>>C#>>正文


C# Game.Run方法代碼示例

本文整理匯總了C#中Microsoft.Xna.Framework.Game.Run方法的典型用法代碼示例。如果您正苦於以下問題:C# Game.Run方法的具體用法?C# Game.Run怎麽用?C# Game.Run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Microsoft.Xna.Framework.Game的用法示例。


在下文中一共展示了Game.Run方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Main

 static void Main(string[] args)
 {
   using (var game = new Game())
   {
     game.Run();
   }
 }
開發者ID:hogeschool,項目名稱:INFSEN01-1,代碼行數:7,代碼來源:Program.cs

示例2: Main

 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     MathHelper.Clamp(4, 3, 5);
     using (Game game = new Game())
     {
         game.Run();
     }
 }
開發者ID:jasonpang,項目名稱:pokemon,代碼行數:11,代碼來源:Program.cs

示例3: changeState

 public static void changeState(state s)
 {
     currentState = s;
     game.Exit();
     //game = null;            //abandon old game
     switch (currentState)
     {
         case state.Level:
             Thread.Sleep(1000);
             game = new Game1();
             game.Run();
             break;
     }
 }
開發者ID:sketchydtail,項目名稱:brickles3k,代碼行數:14,代碼來源:StateLoader.cs

示例4: SetUp

        public void SetUp()
        {
            game = new Game();
            graphics = new GraphicsDeviceManager(game);
            graphics.GraphicsProfile = GraphicsProfile.HiDef;
            contentManager = new ContentManager(game.Services);
            contentManager.RootDirectory = @"C:\Content\";
            game.Run();

            spriteBatch = new SpriteBatch(game.GraphicsDevice);
            game.Services.AddService(typeof(SpriteBatch), spriteBatch);

            catalogManager = new CatalogManager();
            game.Services.AddService(typeof(CatalogManager), catalogManager);
        }
開發者ID:slowbump,項目名稱:KinectTherapyTest,代碼行數:15,代碼來源:CatalogScreenTest.cs

示例5: SetUp

        public void SetUp()
        {
            game = new Game();
            _replayId = string.Empty;
            graphics = new GraphicsDeviceManager(game);
            graphics.GraphicsProfile = GraphicsProfile.HiDef;
            contentManager = new ContentManager(game.Services);
            contentManager.RootDirectory = @"C:\Content\";
            game.Run();

            spriteBatch = new SpriteBatch(game.GraphicsDevice);
            game.Services.AddService(typeof(SpriteBatch), spriteBatch);

            catalogManager = new CatalogManager();
            catalogManager.AddExerciseToSelected("fakeExercise", "fake");

            game.Services.AddService(typeof(CatalogManager), catalogManager);
        }
開發者ID:slowbump,項目名稱:KinectTherapyTest,代碼行數:18,代碼來源:ReplayTileTest.cs

示例6: SetUp

        public void SetUp()
        {
            _game = new Game();
            _graphicsDeviceManager = new GraphicsDeviceManager(_game) { GraphicsProfile = GraphicsProfile.HiDef };
            _contentManager = new ContentManager(_game.Services)
                {
                    RootDirectory = @"C:\Content"
                };
            _game.Run();

            _spriteBatch = new SpriteBatch(_game.GraphicsDevice);
            _game.Services.AddService(typeof(SpriteBatch), _spriteBatch);

            string[] files = Directory.GetFiles(@"c:\school");

            foreach (string file in files)
            {
                File.Delete(file);
            }
        }
開發者ID:slowbump,項目名稱:KinectTherapyTest,代碼行數:20,代碼來源:GuiChartTest.cs

示例7: RunTest

		private void RunTest(InteractiveTest test) {
			if (_activeGame != null || _activeTest != null)
				throw new InvalidOperationException("An interactive test is already active.");

			_activeTest = test;

			_activeGame = test.Create ();
			_activeGame.Exiting += ActiveGame_Exiting;
			_activeGame.Run (GameRunBehavior.Asynchronous);

			View.Window.Hidden = true;
		}
開發者ID:Boerlam001,項目名稱:MonoGame,代碼行數:12,代碼來源:RootViewController.cs

示例8: Run

        public static void Run(params GameScreen[] screens)
        {
            Game = new Game();
            Game.Components.Add(new EngineHelper());

            Contents = new ContentManager();
            Graphics = new GraphicsDeviceManager(Game);
            Inputs = new InputManager();
            Screens = new ScreenManager();
            Settings = new SettingsManager();

            Graphics.PreferredBackBufferWidth = Settings.Get<int>("Graphics.Window.Width");
            Graphics.PreferredBackBufferHeight = Settings.Get<int>("Graphics.Window.Height");
            Graphics.IsFullScreen = Settings.Get<bool>("Graphics.Window.Fullscreen");

            foreach (GameScreen screen in screens)
                Screens.Add(screen);

            Game.Run();
        }
開發者ID:deadpixel52,項目名稱:Fenix,代碼行數:20,代碼來源:Engine.cs

示例9: Begin

 public static void Begin()
 {
     currentState = state.Intro;
     game = new Intro();
     game.Run();
 }
開發者ID:sketchydtail,項目名稱:brickles3k,代碼行數:6,代碼來源:StateLoader.cs

示例10: FinishedLaunching

 //
 // This method is invoked when the application has loaded and is ready to run. In this
 // method you should instantiate the window, load the UI into it and then make the window
 // visible.
 //
 // You have 17 seconds to return from this method, or iOS will terminate your application.
 //
 public override void FinishedLaunching(UIApplication application)
 {
     game = new Game1();
     game.Run();
 }
開發者ID:Ezekoka,項目名稱:MonoGame-StarterKits,代碼行數:12,代碼來源:AppDelegate.cs


注:本文中的Microsoft.Xna.Framework.Game.Run方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。