mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Changed EventDispacher from class to struct
This commit is contained in:
@@ -56,7 +56,7 @@ namespace GlitchyEngine
|
||||
if(!_running)
|
||||
return;
|
||||
|
||||
EventDispatcher dispatcher = scope .(e);
|
||||
EventDispatcher dispatcher = EventDispatcher(e);
|
||||
dispatcher.Dispatch<WindowCloseEvent>(scope => OnWindowClose);
|
||||
|
||||
for(Layer layer in _layerStack)
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace GlitchyEngine.Events
|
||||
}
|
||||
}
|
||||
|
||||
public class EventDispatcher
|
||||
public struct EventDispatcher
|
||||
{
|
||||
private Event _event;
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace Sandbox
|
||||
|
||||
public override void OnEvent(Event event)
|
||||
{
|
||||
EventDispatcher dispatcher = scope EventDispatcher(event);
|
||||
EventDispatcher dispatcher = EventDispatcher(event);
|
||||
|
||||
dispatcher.Dispatch<ImGuiRenderEvent>(scope (e) => OnImGuiRender(e));
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace Sandbox
|
||||
|
||||
public override void OnEvent(Event event)
|
||||
{
|
||||
EventDispatcher dispatcher = scope EventDispatcher(event);
|
||||
EventDispatcher dispatcher = EventDispatcher(event);
|
||||
|
||||
dispatcher.Dispatch<ImGuiRenderEvent>(scope (e) => OnImGuiRender(e));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user