Пример #1
0
    private void OnSetState(MovieWithFadeState state)
    {
        switch (state)
        {
        case MovieWithFadeState.None:
            this.m_Type = MovieType.None;
            MainLevel.Instance.OnStopMovie();
            HUDManager.Get().SetActiveGroup(HUDManager.HUDGroup.Game);
            break;

        case MovieWithFadeState.PreFadeOut:
        {
            Color color = this.m_FadeImage.color;
            color.a = 0f;
            this.m_FadeImage.color = color;
            this.m_Texture.enabled = false;
            this.m_Texture.gameObject.SetActive(false);
            this.m_BG.gameObject.SetActive(false);
            HUDManager.Get().SetActiveGroup(HUDManager.HUDGroup.Movie);
            break;
        }

        case MovieWithFadeState.Movie:
            this.m_Type = MovieType.WithFade;
            this.PlayMovieWithFadeInternal();
            break;

        case MovieWithFadeState.PostFadeOut:
        {
            Color color2 = this.m_FadeImage.color;
            color2.a = 0f;
            this.m_FadeImage.color = color2;
            break;
        }

        case MovieWithFadeState.PostFadeIn:
        {
            Color color3 = this.m_FadeImage.color;
            color3.a = 1f;
            this.m_FadeImage.color = color3;
            this.m_Texture.enabled = false;
            this.m_Texture.gameObject.SetActive(false);
            this.m_BG.gameObject.SetActive(false);
            this.m_MainCamera.enabled = true;
            Inventory3DManager.Get().enabled = true;
            this.m_Camera.enabled = false;
            break;
        }
        }
    }
Пример #2
0
    private void OnSetState(MovieWithFadeState state)
    {
        switch (state)
        {
        case MovieWithFadeState.None:
            this.m_Type = MovieType.None;
            return;

        case MovieWithFadeState.PreFadeOut:
        {
            Color color = this.m_FadeImage.color;
            color.a = 0f;
            this.m_FadeImage.color = color;
            this.m_Texture.texture = null;
            this.m_Texture.enabled = false;
            this.m_Texture.gameObject.SetActive(false);
            this.m_BG.gameObject.SetActive(false);
            HUDManager.Get().SetActiveGroup(HUDManager.HUDGroup.Movie);
            return;
        }

        case MovieWithFadeState.Movie:
            this.m_Type = MovieType.WithFade;
            this.PlayMovieWithFadeInternal();
            return;

        case MovieWithFadeState.PostFadeOut:
        {
            Color color2 = this.m_FadeImage.color;
            color2.a = 0f;
            this.m_FadeImage.color = color2;
            return;
        }

        case MovieWithFadeState.PostFadeIn:
        {
            this.m_PostFadeInStartTime = Time.unscaledTime;
            Color color3 = this.m_FadeImage.color;
            color3.a = 1f;
            this.m_FadeImage.color = color3;
            this.m_Texture.texture = null;
            this.m_Texture.enabled = false;
            this.m_Texture.gameObject.SetActive(false);
            this.m_BG.gameObject.SetActive(false);
            Camera mainCamera = this.m_MainCamera;
            if (mainCamera != null)
            {
                mainCamera.gameObject.SetActive(true);
            }
            Inventory3DManager.Get().enabled = true;
            this.m_Camera.enabled = false;
            RenderTexture renderTexture = this.m_RenderTexture;
            if (renderTexture != null && renderTexture.IsCreated())
            {
                UnityEngine.Object.Destroy(this.m_RenderTexture);
            }
            this.m_RenderTexture = null;
            MainLevel.Instance.OnStopMovie();
            HUDManager.Get().SetActiveGroup(HUDManager.HUDGroup.Game);
            return;
        }

        default:
            return;
        }
    }
Пример #3
0
 private void SetState(MovieWithFadeState state)
 {
     this.m_State = state;
     this.OnSetState(state);
 }