public void UnsubscribeScene(ServiceBase serviceBase, SceneControllerBase controllerBase) { if (_servicesDictionary.TryGetValue(serviceBase.Id, out var service)) { service.UnsubscribeScene(controllerBase); } }
public void SubscribeScene(ServiceBase serviceBase, SceneControllerBase controllerBase) { if (!_servicesDictionary.ContainsKey(serviceBase.Id)) { _servicesDictionary.Add(serviceBase.Id, new Service(serviceBase)); if (_services == null) { _services = new List <string>(); } _services.Add(serviceBase.Id); } _servicesDictionary[serviceBase.Id].SubscribeScene(controllerBase); }
public void Unregister(SceneControllerBase sceneController) { ServiceExecuterInstance.UnsubscribeScene(this, sceneController); OnUnregister(sceneController); }
protected abstract void OnUnregister(SceneControllerBase sceneController);
public void UnsubscribeScene(SceneControllerBase controllerBase) { _sceneControllers.Remove(controllerBase); }
public void SubscribeScene(SceneControllerBase controllerBase) { _sceneControllers.Add(controllerBase); }