Exemple #1
0
 protected override void MapBindings()
 {
     Rapid.Bind <LoadSceneSignal>();
     Rapid.Bind <UnloadSceneSignal>();
     Rapid.Bind <SceneLoadedSignal>();
     Rapid.Bind <SceneUnloadedSignal>();
     LoadSceneSignal.AddCommand <LoadSceneCommand>();
     UnloadSceneSignal.AddCommand <UnloadSceneCommand>();
 }
Exemple #2
0
 protected override void UnmapBindings()
 {
     LoadSceneSignal.RemoveCommand <LoadSceneCommand>();
     UnloadSceneSignal.RemoveCommand <UnloadSceneCommand>();
     Rapid.Unbind <LoadSceneSignal>();
     Rapid.Unbind <UnloadSceneSignal>();
     Rapid.Unbind <SceneLoadedSignal>();
     Rapid.Unbind <SceneUnloadedSignal>();
 }
 public void Execute(LoadSceneSignal loadParams)
 {
     _sceneLoader.LoadScene(loadParams.Scene).Done(
         () =>
     {
         loadParams.OnComplete?.Resolve();
     },
         exception =>
     {
         loadParams.OnComplete?.Reject(exception);
     }
         );
 }