本文整理汇总了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();
}
示例2: Main
public static int Main(string[] args)
{
using (var game = new Game())
game.Run();
return 0;
}
示例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;
}
示例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();
}
示例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>();
}
}
示例6: Main
static void Main(string[] args)
{
using (Game game = new Game())
{
game.Run(30.0f);
}
}
示例7: Main
static void Main(string[] args)
{
Game game = new Game("Game1", 800, 600);
game.IsMouseVisible = true;
Console.WriteLine(game.Window.Icon);
game.Run();
}
示例8: Run
private static void Run(IWorld world)
{
const int iterations = 50;
IGame game = new Game(new ConsoleUserInterface());
game.Run(world, iterations);
}
示例9: Main
public static void Main()
{
using (Game game = new Game())
{
game.Run(60, 60);
}
}
示例10: MainPage
public MainPage()
{
InitializeComponent();
_game = new MiniCubeGame();
_game.Run(panel);
}
示例11: Main
public static void Main(string[] args)
{
using (var game = new Game())
{
game.Run();
}
}
示例12: Main
static void Main()
{
using (var game = new Game())
{
game.Run();
}
}
示例13: Main
static void Main(string[] args)
{
// Profiler.EnableAll();
using (var game = new Game())
{
game.Run();
}
}
示例14: Main
//[STAThread]
public static void Main()
{
using (var game = new Game())// new Examples.Tutorial.TextRendering())
{
game.Run(60);
}
Console.ReadKey();
}
示例15: MainPage
public MainPage()
{
InitializeComponent();
NavigationCacheMode = NavigationCacheMode.Required;
_game = new MiniCubeGame();
_game.Run(DrawingSurface);
}