Nerfed/Nerfed.Editor/Program.cs

42 lines
788 B
C#
Raw Permalink Normal View History

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
{
private static void Main(string[] args)
2024-07-05 12:21:17 +02:00
{
2024-07-12 17:27:01 +02:00
Engine.OnInitialize += HandleOnInitialize;
Engine.OnUpdate += HandleOnUpdate;
Engine.OnRender += HandleOnRender;
Engine.OnQuit += HandleOnQuit;
Engine.Run(args);
2024-07-05 12:21:17 +02:00
}
2024-07-12 17:27:01 +02:00
private static void HandleOnInitialize()
{
// Open project.
// Setip EditorGui.
2024-07-12 19:09:59 +02:00
EditorGui.Initialize();
2024-07-12 17:27:01 +02:00
}
private static void HandleOnUpdate()
{
// Editor Update.
2024-07-12 19:09:59 +02:00
EditorGui.Update();
2024-07-12 17:27:01 +02:00
// Try Catch UserCode Update.
}
private static void HandleOnRender()
{
2024-07-12 19:09:59 +02:00
EditorGui.Render();
2024-07-12 17:27:01 +02:00
}
private static void HandleOnQuit()
{
2024-07-12 19:09:59 +02:00
EditorGui.Quit();
2024-07-12 17:27:01 +02:00
}
}