public static void Setup() { // Setup pools. EntityPool.Init(); ActionPool.Init(); pool = new EntityPool(); systemPool = new SystemPool(); eventPool = new EventPool(); actionPool = new ActionPool(); collisionPool = new CollisionPool(); // Setup event handlers var allEventTypes = (from domainAssembly in AppDomain.CurrentDomain.GetAssemblies() from assemblyType in domainAssembly.GetTypes() where typeof(DeftEvent).IsAssignableFrom(assemblyType) select assemblyType).ToList(); foreach (var eventType in allEventTypes) { eventPool.AddEvent(eventType); } Collisions.Setup(); // Setup systems. systemPool.Add <System_Process_ClearMovedComponents>(); systemPool.Add <System_Process_TriggerInputEvents>(); systemPool.Add <System_Action_SetVelocity>(); systemPool.Add <System_Process_VelocityMovement>(); systemPool.Add <System_Process_RegisterCollisions>(); systemPool.Add <System_Process_CleanupStopCollisions>(); systemPool.Add <System_Process_RegisterNewStopCollisions>(); systemPool.Add <System_Process_KillMe>(); systemPool.Add <System_Process_UpdateGadgets>(); systemPool.Add <System_Event_SelectUIFocus>(); systemPool.Add <System_Event_UpdateUIFocusState>(); systemPool.Add <System_Event_DragAndResizeFocusGadget>(); systemPool.Add <System_Event_UITextEntry>(); systemPool.Add <System_Display_Texture>(); systemPool.Add <System_Display_Box>(); systemPool.Add <System_Display_Circle>(); systemPool.Add <System_UIDisplay_DisplayGadgets>(); systemPool.Add <System_UIDisplay_FocusGadgetOverlay>(); }
public void SubscribeToEvents(EventPool eventPool) { eventPool.SubscribeTo <Event_OnLeftMousePress>(this); eventPool.SubscribeTo <Event_OnLeftMouseClick>(this); }
public void SubscribeToEvents(EventPool eventPool) { eventPool.SubscribeTo <Event_OnLeftMouseDrag>(this); }
public void SubscribeToEvents(EventPool eventPool) { }
public void SubscribeToEvents(EventPool eventPool) { eventPool.SubscribeTo <Event_OnTextEntry>(this); }