Beispiel #1
0
        private IEnumerator LoadCurrentSceneRoutine(SceneConfig config)
        {
            this.IsLoading = true;
            this.OnSceneStartLoadEvent?.Invoke(this.Scene);

            yield return(Coroutines.StartRoutine(InitializeSceneRoutine(config)));

            this.IsLoading = false;
            this.OnSceneLoadedEvent?.Invoke(this.Scene);
            LoadingScreen.Hide();
        }
Beispiel #2
0
        private IEnumerator LoadSceneRoutine(SceneConfig config)
        {
            var loadAsync = SceneManager.LoadSceneAsync(config.SceneName);

            loadAsync.allowSceneActivation = false;

            while (loadAsync.progress < 0.9f)
            {
                yield return(null);
            }

            loadAsync.allowSceneActivation = true;
            LoadingScreen.Hide();
        }
 public RepositoriesBase(SceneConfig config)
 {
     sceneConfig = config;
 }
Beispiel #4
0
 public InteractorsBase(SceneConfig config)
 {
     sceneConfig = config;
 }
Beispiel #5
0
 private IEnumerator InitializeSceneRoutine(SceneConfig config)
 {
     this.Scene = new Scene(config);
     yield return(this.Scene.InitializeRoutine());
 }
 public Scene(SceneConfig config)
 {
     sceneConfig      = config;
     repositoriesBase = new RepositoriesBase(config);
     interactorsBase  = new InteractorsBase(config);
 }