2024-07-11 23:46:32 +02:00
|
|
|
|
using Nerfed.Runtime;
|
|
|
|
|
|
|
|
|
|
namespace Nerfed.Editor;
|
2024-07-05 12:56:37 +02:00
|
|
|
|
|
|
|
|
|
internal class Program
|
2024-07-05 12:21:17 +02:00
|
|
|
|
{
|
2024-07-05 14:32:58 +02:00
|
|
|
|
private static void Main(string[] args)
|
2024-07-05 12:21:17 +02:00
|
|
|
|
{
|
2024-07-12 23:10:44 +02:00
|
|
|
|
Engine.OnInitialize += HandleOnInitialize;
|
|
|
|
|
Engine.OnUpdate += HandleOnUpdate;
|
|
|
|
|
Engine.OnRender += HandleOnRender;
|
|
|
|
|
Engine.OnQuit += HandleOnQuit;
|
|
|
|
|
|
2024-07-05 14:32:58 +02:00
|
|
|
|
Engine.Run(args);
|
2024-07-05 12:21:17 +02:00
|
|
|
|
}
|
2024-07-12 23:10:44 +02:00
|
|
|
|
|
|
|
|
|
private static void HandleOnInitialize()
|
|
|
|
|
{
|
|
|
|
|
// Open project.
|
|
|
|
|
// Setip EditorGui.
|
|
|
|
|
EditorGui.Initialize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void HandleOnUpdate()
|
|
|
|
|
{
|
|
|
|
|
// Editor Update.
|
|
|
|
|
EditorGui.Update();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Try Catch UserCode Update.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void HandleOnRender()
|
|
|
|
|
{
|
|
|
|
|
EditorGui.Render();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void HandleOnQuit()
|
|
|
|
|
{
|
|
|
|
|
EditorGui.Quit();
|
|
|
|
|
}
|
|
|
|
|
}
|