当前位置: 首页>>代码示例>>C#>>正文


C# Game.Run方法代码示例

本文整理汇总了C#中Game.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Game.Run方法的具体用法?C# Game.Run怎么用?C# Game.Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Game的用法示例。


在下文中一共展示了Game.Run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

        static void Main(string[] args)
        {
            Configuration.GetGlobal().DataDirectory = Util.GetDataDirectory();

            Game game = new Game();
            game.Run();
        }
开发者ID:uchan-nos,项目名称:howitzer,代码行数:7,代码来源:Program.cs

示例2: Main

        public static int Main(string[] args)
        {
            using (var game = new Game())
                game.Run();

            return 0;
        }
开发者ID:LipkeGu,项目名称:OpenRPG,代码行数:7,代码来源:Program.cs

示例3: Main

        static int Main( string[] args )
        {
            // 	colored console output :
            Log.AddListener( new ColoredLogListener() );

            //	output for in-game console :
            Log.AddListener( new LogRecorder() );

            //	set verbosity :
            Log.VerbosityLevel = LogMessageType.Verbose;

            //
            //	Build content on startup.
            //	Remove this line in release code.
            //
            Builder.Options.InputDirectory = @"..\..\..\Content";
            Builder.Options.TempDirectory = @"..\..\..\Temp";
            Builder.Options.OutputDirectory = @"Content";
            Builder.SafeBuild();

            //
            //	Run game :
            //
            using (var game = new Game( "ShooterDemo" )) {

                //	create SV, CL and UI instances :
                game.GameServer = new ShooterServer( game );
                game.GameClient = new ShooterClient( game );
                game.UserInterface = new ShooterInterface( game );

                //	load configuration.
                //	first run will cause warning,
                //	because configuration file still does not exist.
                game.Config.Load( "Config.ini" );

                //	enable and disable debug direct3d device :
                game.RenderSystem.UseDebugDevice = false;
                game.RenderSystem.Fullscreen	= false;

                //	enable and disable object tracking :
                game.TrackObjects = false;

                //	set game title :
                game.GameTitle = "ShooterDemo";

                //	apply command-line options here:
                //	...
                if (!LaunchBox.ShowDialog(game, "Config.ini")) {
                    return 0;
                }

                //	run:
                game.Run();

                //	save configuration :
                game.Config.Save( "Config.ini" );
            }

            return 0;
        }
开发者ID:demiurghg,项目名称:ShooterDemo,代码行数:60,代码来源:Program.cs

示例4: Main

        public static void Main(string[] args)
        {
            var traceListener = new ConsoleTraceListener(true);
            Debug.Listeners.Add(traceListener);
            Debug.AutoFlush = true;

            var game = new Game(
                width: 1024,
                height: 768,
                mode: new GraphicsMode(
                    color: new ColorFormat(32),
                    depth: 24,
                    stencil: 8,
                    samples: 4
                ),
                title: "DEBUG: Legends of the Universe",
                options: GameWindowFlags.Default,
                device: DisplayDevice.Default,
                major: 4,
                minor: 0,
                flags: GraphicsContextFlags.ForwardCompatible | GraphicsContextFlags.Debug
            );

            game.Run();
        }
开发者ID:Earth2Me,项目名称:Lotu,代码行数:25,代码来源:Program.cs

示例5: Main

 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game game = new Game("Content.txt"))
     {
         game.Run<ColorScreenActivity>();
     }
 }
开发者ID:CD-UNCC,项目名称:xna-broad-engine,代码行数:10,代码来源:Program.cs

示例6: Main

 static void Main(string[] args)
 {
     using (Game game = new Game())
     {
         game.Run(30.0f);
     }
 }
开发者ID:remludar,项目名称:roguelikedev,代码行数:7,代码来源:Program.cs

示例7: Main

 static void Main(string[] args)
 {
     Game game = new Game("Game1", 800, 600);
     game.IsMouseVisible = true;
     Console.WriteLine(game.Window.Icon);
     game.Run();
 }
开发者ID:WardBenjamin,项目名称:Flare.Samples,代码行数:7,代码来源:Program.cs

示例8: Run

        private static void Run(IWorld world)
        {
            const int iterations = 50;

            IGame game = new Game(new ConsoleUserInterface());
            game.Run(world, iterations);
        }
开发者ID:rhanekom,项目名称:katas,代码行数:7,代码来源:Program.cs

示例9: Main

 public static void Main()
 {
     using (Game game = new Game())
     {
         game.Run(60, 60);
     }
 }
开发者ID:CaptainCow95,项目名称:MinionsOfDeath,代码行数:7,代码来源:Program.cs

示例10: MainPage

        public MainPage()
        {
            InitializeComponent();

            _game = new MiniCubeGame();
            _game.Run(panel);
        }
开发者ID:RecursiveCall,项目名称:SharpDX-Samples,代码行数:7,代码来源:MainPage.xaml.cs

示例11: Main

 public static void Main(string[] args)
 {
     using (var game = new Game())
     {
         game.Run();
     }
 }
开发者ID:prshreshtha,项目名称:ultraviolet,代码行数:7,代码来源:Game.cs

示例12: Main

 static void Main()
 {
     using (var game = new Game())
     {
         game.Run();
     }
 }
开发者ID:persn,项目名称:MotionWordPlay,代码行数:7,代码来源:Program.cs

示例13: Main

 static void Main(string[] args)
 {
     // Profiler.EnableAll();
     using (var game = new Game())
     {
         game.Run();
     }
 }
开发者ID:cg123,项目名称:xenko,代码行数:8,代码来源:RaycastingApp.cs

示例14: Main

 //[STAThread]
 public static void Main()
 {
     using (var game = new Game())// new Examples.Tutorial.TextRendering())
     {
         game.Run(60);
     }
     Console.ReadKey();
 }
开发者ID:gitter-badger,项目名称:Flare.Framework,代码行数:9,代码来源:Program.cs

示例15: MainPage

        public MainPage()
        {
            InitializeComponent();

            NavigationCacheMode = NavigationCacheMode.Required;

            _game = new MiniCubeGame();
            _game.Run(DrawingSurface);
        }
开发者ID:Keldrim,项目名称:SharpDX,代码行数:9,代码来源:MainPage.xaml.cs


注:本文中的Game.Run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。