public void AddControllerIfNotExists(IMessageProcessHandler messageHandler, string sceneId, bool isGlobal = false) { if (!ContainsController(sceneId)) { AddController(messageHandler, sceneId, isGlobal); } }
public void Initialize(IMessageProcessHandler messageHandler, ISceneHandler sceneHandler) { if (initialized) { return; } messagingControllersManager.Initialize(messageHandler); pointerEventsController.Initialize(); memoryManager.Initialize(); worldBlockersController = WorldBlockersController.CreateWithDefaultDependencies(sceneHandler, DCLCharacterController.i.characterPosition); initialized = true; }
public MessagingController(IMessageProcessHandler messageHandler, string debugTag = null) { this.debugTag = debugTag; this.messageHandler = messageHandler; //TODO(Brian): This is too hacky, most of the controllers won't be using this system. Refactor this in the future. uiBus = AddMessageBus(MessagingBusType.UI); initBus = AddMessageBus(MessagingBusType.INIT); systemBus = AddMessageBus(MessagingBusType.SYSTEM); currentQueueState = QueueState.Init; StartBus(MessagingBusType.INIT); StartBus(MessagingBusType.UI); }
public void Initialize(IMessageProcessHandler messageHandler) { messagingControllers[GLOBAL_MESSAGING_CONTROLLER] = new MessagingController(messageHandler, GLOBAL_MESSAGING_CONTROLLER); if (!string.IsNullOrEmpty(GLOBAL_MESSAGING_CONTROLLER)) { messagingControllers.TryGetValue(GLOBAL_MESSAGING_CONTROLLER, out globalController); } Environment.i.world.sceneController.OnSortScenes += MarkBusesDirty; if (mainCoroutine == null) { mainCoroutine = CoroutineStarter.Start(ProcessMessages()); } }
public void AddController(IMessageProcessHandler messageHandler, string sceneId, bool isGlobal = false) { if (!messagingControllers.ContainsKey(sceneId)) { messagingControllers[sceneId] = new MessagingController(messageHandler, sceneId); } if (isGlobal) { globalSceneId = sceneId; } if (!string.IsNullOrEmpty(globalSceneId)) { messagingControllers.TryGetValue(globalSceneId, out uiSceneController); } PopulateBusesToBeProcessed(); }
public void Restart(IMessageProcessHandler messageHandler, ISceneHandler sceneHandler) { Cleanup(); Initialize(messageHandler, sceneHandler); }