コード例 #1
0
        protected void EnterStage(IntroStage setStage)
        {
            Stage = setStage;
            elapsedTimeInStage = 0;

            switch (setStage)
            {
            case IntroStage.Castle:
                CurrentAlpha = 0.0f;
                break;
            }

            InvokeStageSwitched(setStage);
        }
コード例 #2
0
ファイル: IntroStoryboard.cs プロジェクト: CAMongrel/WinWar
        private void EnterStage(IntroStage setStage)
        {
            Stage = setStage;
             elapsedTimeInStage = 0;

             switch (setStage)
             {
             case IntroStage.Castle:
            CurrentAlpha = 0.0f;
            break;
             }

             if (OnStageSwitched != null)
            OnStageSwitched (setStage);
        }
コード例 #3
0
ファイル: IntroGameScreen.cs プロジェクト: CAMongrel/WinWar
      async void storyboard_OnStageSwitched(IntroStage newStage)
      {
         switch (newStage)
         {
            case IntroStage.Castle:
               player.Open(await GetMovieFile("HINTRO1.WAR"));
               player.PauseAfterFirstFrame = true;
               player.ShouldLoop = false;
               break;

            case IntroStage.CastleLoop:
               player.Open(await GetMovieFile("HINTRO2.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = true;
               break;

            case IntroStage.Swamp:
               player.Open(await GetMovieFile("OINTRO1.WAR"));
               player.PauseAfterFirstFrame = true;
               player.ShouldLoop = false;
               break;

            case IntroStage.SwampLoop:
               player.Open(await GetMovieFile("OINTRO2.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = true;
               break;

            case IntroStage.SwampFortressEnter:
               player.Open(await GetMovieFile("OINTRO3.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = false;
               break;

            case IntroStage.CaveEnter:
               player.Open(await GetMovieFile("CAVE1.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = false;
               break;

            case IntroStage.CaveLoop:
               player.Open(await GetMovieFile("CAVE2.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = true;
               break;

            case IntroStage.CaveExit:
               player.Open(await GetMovieFile("CAVE3.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = false;
               break;

            case IntroStage.BlizzardLogo:
               player.Open(await GetMovieFile("TITLE.WAR"));
               player.PauseAfterFirstFrame = false;
               player.ShouldLoop = false;
               break;
         }

         player.Play();
      }
コード例 #4
0
        /// <summary>
        /// Callback when next scene is loaded
        /// Has the logic of the flow related to previous and next scene
        /// </summary>
        private IEnumerator NextSceneLoadedCoroutine()
        {
            GameObject nextSceneContent = FindContent();

            ZoomInOutBehaviour.ZoomInIsDone  = false;
            ZoomInOutBehaviour.ZoomOutIsDone = false;

            SceneTransition previousTransition = (prevSceneLoaded) ? prevSceneLoaded.GetComponentInChildren <SceneTransition>() : null;
            SceneTransition newTransition      = nextSceneContent.GetComponentInChildren <SceneTransition>();

            CurrentActiveScene = nextSceneContent;

            SetActivationOfTouchscript(false);
            DeactivateOrbitUpdater(newTransition, previousTransition, false);
            SetActivePOIRotationAnimator(false, previousTransition, newTransition);
            UpdateActivationOfPOIs(newTransition, false);
            UpdateActivationOfPOIs(previousTransition, false);

            // Scale new scene to fit inside the volume
            float scaleToFill = transformSource.transform.lossyScale.x;
            float targetSize  = newTransition.GetScalar(scaleToFill);

            newTransition.transform.GetChild(0).localScale = Vector3.one * targetSize;

            // Initialize zoom in and out transition properties
            StartCoroutine(ZoomInOutBehaviour.ZoomInOutInitialization(nextSceneContent, prevSceneLoaded));

            // In order for the next scene not being visible while the previous is fading, set scale to zero and deactivate all its colliders
            if (ZoomInOutBehaviour.GetNextScene)
            {
                ZoomInOutBehaviour.GetNextScene.transform.localScale = Vector3.zero;
                SetCollidersActivation(ZoomInOutBehaviour.GetNextScene.GetComponentsInChildren <Collider>(), false);
            }

            // Deactivate previous scene's colliders
            if (previousTransition)
            {
                SetCollidersActivation(previousTransition.GetComponentsInChildren <Collider>(), false);
            }

            yield return(new WaitForEndOfFrame());

            StartCoroutine(ZoomInOutSimultaneouslyFlow(previousTransition, newTransition));

            // wait until prev scene transition finishes
            while (!ZoomInOutBehaviour.ZoomOutIsDone)
            {
                yield return(null);
            }

            DeactivateOrbitUpdater(newTransition, previousTransition, true);
            UpdateActivationOfPOIs(newTransition, true);

            // Unload previous scene
            if (prevSceneLoaded != null)
            {
                UnloadScene(prevSceneLoaded.scene.name, true);
            }

            // Wait until next scene transition is done
            while (!ZoomInOutBehaviour.ZoomInIsDone)
            {
                yield return(null);
            }

            SetActivePOIRotationAnimator(true, previousTransition, newTransition);

            // Fade in pois of next scene
            if (introStage != IntroStage.kActiveIntro)
            {
                isFading = true;
                GalaxyExplorerManager.Instance.GeFadeManager.Fade(newTransition.GetComponentInChildren <POIMaterialsFader>(), GEFadeManager.FadeType.FadeIn, PoiFadeInDuration, POIOpacityCurveEndTransition);
            }

            while (isFading)
            {
                yield return(null);
            }

            yield return(new WaitForEndOfFrame());

            while (GalaxyExplorerManager.Instance.VoManager.ShouldAudioBlockProgress)
            {
                yield return(null);
            }

            // Activate colliders of next scene
            if (ZoomInOutBehaviour.GetNextScene && introStage != IntroStage.kActiveIntro)
            {
                SetCollidersActivation(ZoomInOutBehaviour.GetNextScene.GetComponentsInChildren <Collider>(), true);
            }

            SetActivationOfTouchscript(true);

            inTransition = false;
            introStage   = (introStage == IntroStage.kLastStageIntro) ? IntroStage.kInactiveIntro : introStage;

            yield return(null);
        }
コード例 #5
0
 // Callback when introduction flow is completed. This is hooked up in FlowManager in editor
 public void OnIntroFinished()
 {
     introStage = IntroStage.kLastStageIntro;
 }
コード例 #6
0
 // Callback when introduction flow starts. This is hooked up in FlowManager in editor
 public void OnIntroStarted()
 {
     introStage = IntroStage.kActiveIntro;
 }
コード例 #7
0
 protected void InvokeStageSwitched(IntroStage setStage)
 {
     OnStageSwitched?.Invoke(setStage);
 }
コード例 #8
0
ファイル: IntroGameScreen.cs プロジェクト: ryancheung/WinWar
        async void storyboard_OnStageSwitched(IntroStage newStage)
        {
            switch (newStage)
            {
            case IntroStage.Castle:
                player.Open(await GetMovieFile("HINTRO1.WAR"));
                player.PauseAfterFirstFrame = true;
                player.ShouldLoop           = false;
                break;

            case IntroStage.CastleLoop:
                player.Open(await GetMovieFile("HINTRO2.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = true;
                break;

            case IntroStage.Swamp:
                player.Open(await GetMovieFile("OINTRO1.WAR"));
                player.PauseAfterFirstFrame = true;
                player.ShouldLoop           = false;
                break;

            case IntroStage.SwampLoop:
                player.Open(await GetMovieFile("OINTRO2.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = true;
                break;

            case IntroStage.SwampFortressEnter:
                player.Open(await GetMovieFile("OINTRO3.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = false;
                break;

            case IntroStage.CaveEnter:
                player.Open(await GetMovieFile("CAVE1.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = false;
                break;

            case IntroStage.CaveLoop:
                player.Open(await GetMovieFile("CAVE2.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = true;
                break;

            case IntroStage.CaveExit:
                player.Open(await GetMovieFile("CAVE3.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = false;
                break;

            case IntroStage.BlizzardLogo:
                player.Open(await GetMovieFile("TITLE.WAR"));
                player.PauseAfterFirstFrame = false;
                player.ShouldLoop           = false;
                break;
            }

            player.Play();
        }