Browse Source

Started implementing the event system.

improved_timing
Ian Burgmyer 7 years ago
parent
commit
d1821ee4d4
  1. 17
      DotSDL/Events/EventDispatcher.cs
  2. 2
      DotSDL/Graphics/SdlWindow.cs

17
DotSDL/Events/EventDispatcher.cs

@ -0,0 +1,17 @@
using System;
namespace DotSDL.Events {
/// <summary>
/// Handles dispatching events to objects that can receive them.
/// </summary>
internal static class EventDispatcher {
private static readonly ResourceManager Resources = ResourceManager.Instance;
/// <summary>
/// Processes and dispatches all outstanding events.
/// </summary>
internal static void ProcessEvents() {
throw new NotImplementedException();
}
}
}

2
DotSDL/Graphics/SdlWindow.cs

@ -142,6 +142,8 @@ namespace DotSDL.Graphics {
/// </summary>
private void BaseUpdate() {
if(IsDestroyed) return;
Events.EventDispatcher.ProcessEvents();
OnUpdate(); // Call the overridden Update function.
}

Loading…
Cancel
Save