当前位置: 首页>>代码示例>>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;未经允许,请勿转载。