Exemple #1
0
        public void HandleChangeConversation(Object p_sender, EventArgs p_args)
        {
            IngameController main = IngameController.Instance;

            if (String.IsNullOrEmpty(m_currentIndoorScene) || m_indoorModel == null)
            {
                HandleBeginConversation(main);
            }
            else
            {
                m_popupActive        = false;
                m_InConversation     = true;
                m_currentIndoorScene = LegacyLogic.Instance.ConversationManager.IndoorScene;
                if (String.IsNullOrEmpty(m_currentIndoorScene))
                {
                    main.Minimap.gameObject.SetActive(false);
                    main.HUDControl.gameObject.SetActive(false);
                    main.DangerSense.gameObject.SetActive(false);
                    m_finishIndoorSceneLoad   = true;
                    m_finishFade              = true;
                    m_conversation.FinishFade = true;
                    m_conversation.gameObject.SetActive(true);
                    m_conversation.Init();
                    m_container.Init();
                }
                else
                {
                    m_finishIndoorSceneLoad   = false;
                    m_finishFade              = false;
                    m_conversation.FinishFade = false;
                    m_conversation.gameObject.SetActive(false);
                    OverlayManager  overlay      = IngameController.Instance.Overlay;
                    IndoorSceneRoot currentModel = m_indoorModel;
                    EventHandler    callback     = delegate(Object sender, EventArgs e)
                    {
                        main.Minimap.gameObject.SetActive(false);
                        main.HUDControl.gameObject.SetActive(false);
                        main.DangerSense.gameObject.SetActive(false);
                        IndoorSceneLoader.Instance.RequestIndoorScene(m_currentIndoorScene);
                        m_finishFade = true;
                        m_conversation.FinishFade = true;
                        m_conversation.gameObject.SetActive(true);
                        FXMainCamera instance = FXMainCamera.Instance;
                        instance.SwitchCamera(null);
                        if (currentModel != null)
                        {
                            currentModel.gameObject.SetActive(false);
                        }
                        m_conversation.Init();
                        m_container.Init();
                    };
                    overlay.FadeFrontTo(1f, 1f, callback);
                }
            }
        }
Exemple #2
0
        public void HandleEndConversation(IngameController main)
        {
            IndoorSceneRoot currentModel = m_indoorModel;

            if (!String.IsNullOrEmpty(m_currentIndoorScene) && !m_conversation.m_skipFade)
            {
                OverlayManager overlay  = IngameController.Instance.Overlay;
                EventHandler   callback = delegate(Object sender, EventArgs e)
                {
                    main.Minimap.gameObject.SetActive(true);
                    main.HUDControl.gameObject.SetActive(true);
                    main.DangerSense.gameObject.SetActive(true);
                    m_conversation.gameObject.SetActive(false);
                    FXMainCamera instance2 = FXMainCamera.Instance;
                    instance2.SwitchCamera(null);
                    if (currentModel != null)
                    {
                        currentModel.gameObject.SetActive(false);
                        AudioManager.Instance.RequestPlayAudioID(currentModel.ExitAudioID, 0, -1f, instance2.transform, 1f, 0f, 0f, null);
                    }
                    LegacyLogic.Instance.EventManager.InvokeEvent(null, EEventType.INDOOR_SCENE_CLOSED, EventArgs.Empty);
                    overlay.FadeFrontTo(0f);
                };
                overlay.FadeFrontTo(1f, 1f, callback);
            }
            else
            {
                main.Minimap.gameObject.SetActive(true);
                main.HUDControl.gameObject.SetActive(true);
                main.DangerSense.gameObject.SetActive(true);
                m_conversation.gameObject.SetActive(false);
                FXMainCamera instance = FXMainCamera.Instance;
                instance.SwitchCamera(null);
                if (currentModel != null && currentModel.gameObject.activeSelf)
                {
                    currentModel.gameObject.SetActive(false);
                    AudioManager.Instance.RequestPlayAudioID(currentModel.ExitAudioID, 0, -1f, instance.transform, 1f, 0f, 0f, null);
                }
                LegacyLogic.Instance.EventManager.InvokeEvent(null, EEventType.INDOOR_SCENE_CLOSED, EventArgs.Empty);
            }
            m_conversation.m_skipFade = false;
            m_currentIndoorScene      = null;
            m_InConversation          = false;
        }