コード例 #1
0
ファイル: Configuration.cs プロジェクト: GeBo1/GeBoPlugins
 private static void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e)
 {
     if (e.Operation == SceneOperationKind.Clear)
     {
         TranslationHelper.NotifyBehaviorChanged(e);
     }
 }
コード例 #2
0
        private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e)
        {
#if DEBUG
            //Logger.LogDebug( $"StudioSaveLoadApi_SceneLoad({sender}, {e}) {CurrentScenePathCandidate}, {e.Operation}");
#endif
            if (e.Operation == SceneOperationKind.Clear)
            {
                _currentScenePath = _currentScenePathCandidate = string.Empty;
            }

            var coroutines = new List <IEnumerator>();

            if (!string.IsNullOrEmpty(_currentScenePathCandidate) && e.Operation == SceneOperationKind.Load)
            {
                _currentScenePath          = _currentScenePathCandidate;
                _currentScenePathCandidate = string.Empty;
                if (_navigationInProgress)
                {
                    coroutines.Add(
                        CoroutineUtils.CreateCoroutine(() => PlayNotificationSound(NotificationSound.Success)));
                    coroutines.Add(SetPageCoroutine(_currentScenePath));
                }
            }

            coroutines.Add(CoroutineUtils.CreateCoroutine(() =>
            {
                _navigationInProgress = false;
                TrackLastLoadedScene();
            }));
            coroutines.Add(SaveTrackingFileCouroutine(_saveTrackingFileDelay));
            StartCoroutine(CoroutineUtils.ComposeCoroutine(coroutines.ToArray()));
        }
コード例 #3
0
ファイル: CoroutineLimiter.cs プロジェクト: GeBo1/GeBoPlugins
 private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e)
 {
     if (e.Operation != SceneOperationKind.Clear)
     {
         return;
     }
     Reset();
 }
コード例 #4
0
 private void OnSceneLoad(object sender, SceneLoadEventArgs e)
 {
     if (e.Operation == SceneOperationKind.Import && ImportSound.Value)
     {
         PlayAlertSound();
     }
     else if (e.Operation == SceneOperationKind.Load && LoadSound.Value)
     {
         PlayAlertSound();
     }
 }
コード例 #5
0
        private void StudioSaveLoadApi_SceneLoad(object sender, SceneLoadEventArgs e)
        {
            UpdateSaveReady();
            if (e.Operation == SceneOperationKind.Clear)
            {
                _currentScenePath = _currentScenePathCandidate = string.Empty;
            }

            var coroutines = GeBoCommon.Utilities.ListPool <IEnumerator> .Get();

            try
            {
                if (!string.IsNullOrEmpty(_currentScenePathCandidate) && e.Operation == SceneOperationKind.Load)
                {
                    _currentScenePath          = _currentScenePathCandidate;
                    _currentScenePathCandidate = string.Empty;
                    if (_navigationInProgress)
                    {
                        coroutines.Add(
                            CoroutineUtils.CreateCoroutine(() => PlayNotificationSound(NotificationSound.Success)));
                        coroutines.Add(SetPageCoroutine(_currentScenePath));
                    }
                }

                coroutines.Add(CoroutineUtils.CreateCoroutine(() =>
                {
                    _navigationInProgress = false;
                    TrackLastLoadedScene();
                }));
                coroutines.Add(SaveTrackingFileCouroutine());
                StartCoroutine(CoroutineUtils.ComposeCoroutine(coroutines.ToArray()));
            }
            finally
            {
                GeBoCommon.Utilities.ListPool <IEnumerator> .Release(coroutines);
            }
        }