static void Main(string[] args) { using (CoreEngine gioco = new CoreEngine()) { gioco.Run(60.0); } }
//TODO: Weird heap corruption bug happens sometimes. -1073740940 static void Main(string[] args) { CoreEngine.Initialize(); CoreEngine.targetFps = 0; Asset.LoadAssetPackage("data/assets.dat"); //Physics.Settings.Gravity = Vector3.Zero; InitializeWorld(); Profiler.ProfilingEnabled = true; Physics.Settings.Gravity = Vector3.Zero; Physics.Settings.solverIterationCount = 2; CoreEngine.Update += delegate { if (CoreEngine.FrameNumber == 500) { Profiler.WriteToFile(@"D:\ecs_profile_speedscope.json", ProfilingFormat.SpeedScope, FrameSelection.Shortest); Profiler.WriteToFile(@"D:\ecs_profile_chrometracing_95.json", ProfilingFormat.ChromeTracing, FrameSelection.Percentile95); Profiler.WriteToFile(@"D:\ecs_profile_chrometracing_median.json", ProfilingFormat.ChromeTracing, FrameSelection.Median); Profiler.WriteToFile(@"D:\ecs_profile_chrometracing_shortest.json", ProfilingFormat.ChromeTracing, FrameSelection.Shortest); } }; CoreEngine.Run(); }
public static void Main(string[] args) { var engine = new CoreEngine(); var zonePlaceables = OEQZoneReader.Read(args[0]); foreach (var placeable in zonePlaceables) { engine.AddPlaceable(placeable); } engine.Run(); }
public static void Main(string[] args) { CoreEngine engine = new CoreEngine(); Assembly dll = Assembly.LoadFile(args[0]); foreach (Type type in dll.GetExportedTypes()) { if (typeof(IGame).IsAssignableFrom(type)) { engine.Run((IGame)Activator.CreateInstance(type, engine), args.Length > 1 ? uint.Parse(args[1]) : 20, args.Length > 2 ? uint.Parse(args[2]) : 60); break; } } }
public static void Main(string[] args) { var engine = new CoreEngine(); var gui = engine.Gui; /*var code = @" * function testfunc() * print(""Test"") * print(textbox.Text) * end * win = gui.CreateWindow('Test') * textbox = win.CreateTextbox() * button = win.CreateButton('Test button') * button.Click.add(testfunc) * "; * UserData.RegisterAssembly(); * var script = new Script(); * script.Globals["gui"] = gui; * script.DoString(code);*/ var window = gui.CreateWindow("The Zone Zone"); var zoneinput = window.CreateTextbox(maxLength: 50); var button = window.CreateButton("Load"); button.Click += () => { WriteLine($"Loading zone {zoneinput.Text}"); engine.DeleteAll(); var zonePlaceables = OEQZoneReader.Read($"{zoneinput.Text}.zip"); foreach (var placeable in zonePlaceables) { engine.AddPlaceable(placeable); } }; window = gui.CreateWindow("Debug"); window.CreateLabel(() => $"Position: {engine.Camera.Position.X} {engine.Camera.Position.Y} {engine.Camera.Position.Z}"); var charmodel = OEQCharReader.Read("orc_chr.zip")["ORC_ACTORDEF"]; charmodel.Animation = "L02"; engine.AddMob(new Mob(charmodel)); engine.Run(); }