mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-01 19:08:19 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
41 lines
659 B
C#
41 lines
659 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sandbox;
|
|
|
|
public static class Launcher
|
|
{
|
|
public static int Main()
|
|
{
|
|
var appSystem = new GameAppSystem();
|
|
appSystem.Run();
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public class GameAppSystem : AppSystem
|
|
{
|
|
public override void Init()
|
|
{
|
|
LoadSteamDll();
|
|
base.Init();
|
|
|
|
Environment.SetEnvironmentVariable( "SBOX_MODE", "BENCHMARK" );
|
|
|
|
CreateGame();
|
|
CreateMenu();
|
|
|
|
// Disable asserts for all benchmarks
|
|
NativeEngine.EngineGlobal.Plat_SetNoAssert();
|
|
|
|
var createInfo = new AppSystemCreateInfo()
|
|
{
|
|
WindowTitle = "s&box benchmark",
|
|
Flags = AppSystemFlags.IsGameApp
|
|
};
|
|
|
|
InitGame( createInfo );
|
|
}
|
|
}
|