Exemple #1
0
 public void UnsubscribeScene(ServiceBase serviceBase, SceneControllerBase controllerBase)
 {
     if (_servicesDictionary.TryGetValue(serviceBase.Id, out var service))
     {
         service.UnsubscribeScene(controllerBase);
     }
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public void Unregister(SceneControllerBase sceneController)
 {
     ServiceExecuterInstance.UnsubscribeScene(this, sceneController);
     OnUnregister(sceneController);
 }
Exemple #4
0
 protected abstract void OnUnregister(SceneControllerBase sceneController);
Exemple #5
0
 public void UnsubscribeScene(SceneControllerBase controllerBase)
 {
     _sceneControllers.Remove(controllerBase);
 }
Exemple #6
0
 public void SubscribeScene(SceneControllerBase controllerBase)
 {
     _sceneControllers.Add(controllerBase);
 }