animations and QOL

This commit is contained in:
bird_egop
2026-06-12 02:06:32 +03:00
parent 4d0d1aca12
commit 1cb3940cce
14 changed files with 444 additions and 32 deletions
+12
View File
@@ -26,6 +26,7 @@ public class App
public ImFontPtr OpenSansFont;
private List<IImGuiPanel> _imGuiPanels = [];
private List<IUpdateReceiver> _updateReceivers = [];
private Later _later = new();
public App()
@@ -59,6 +60,11 @@ public class App
serviceCollection.AddSingleton(type);
}
foreach (var type in Utils.GetAssignableTypes<IUpdateReceiver>())
{
serviceCollection.AddSingleton(type);
}
serviceCollection.AddSingleton(openGl);
serviceCollection.AddSingleton(window);
@@ -78,6 +84,10 @@ public class App
_imGuiPanels = Utils.GetAssignableTypes<IImGuiPanel>()
.Select(t => (serviceProvider.GetService(t) as IImGuiPanel)!)
.ToList();
_updateReceivers = Utils.GetAssignableTypes<IUpdateReceiver>()
.Select(t => (serviceProvider.GetService(t) as IUpdateReceiver)!)
.ToList();
foreach (var type in Utils.GetAssignableTypes<ILaunchReceiver>())
{
@@ -159,6 +169,8 @@ public class App
public void Update(double delta)
{
foreach (var updateReceiver in _updateReceivers)
updateReceiver.OnUpdate((float)delta);
}
public void OnKeyPressed(Key key)