public override void Initialize() { PreInitialize(); FindModules <WindowModule>().ForEach(w => WindowsAsDict.Add(w, new WindowController(services.Make <WindowModule>(w), services))); FindModules <CursorModule>().ForEach(c => CursorsAsDict.Add(c, new CursorController(services.Make <CursorModule>(c), services))); controllerRepository.Controllers.ForEach(c => c.Initialize()); WindowsAsDict.Values.ForEach(w => w.PreInitialize()); CursorsAsDict.Values.ForEach(c => c.PreInitialize()); WindowsAsDict.Values.ForEach(w => w.Initialize()); CursorsAsDict.Values.ForEach(c => c.Initialize()); base.Initialize(); mouse.AsXnaGameLoop()?.Initialize(); }
public override void Initialize() { base.Initialize(); foreach (var type in GenerateDialogs()) { var monoGameDialog = new MonoGameDialog(services, services.Make <Dialog>(type)); Dialogs[type] = monoGameDialog; XnaWrappedDialogs.Add(monoGameDialog); monoGameDialog.Initialize(); } foreach (var type in GenerateWindows()) { var monoGameWindow = new MonoGameWindow(services, services.Make <Window>(type)); Windows[type] = monoGameWindow; XnaWrappedWindows.Add(monoGameWindow); monoGameWindow.Initialize(); } userInterface.Initialize(); mouse.AsXnaGameLoop()?.Initialize(); }