public override void OnClose()
    {
        TsAudio.RestoreMuteAllAudio();
        TsAudio.RefreshAllMuteAudio();
        if (null != this.rootEffectGameObject)
        {
            UnityEngine.Object.Destroy(this.rootEffectGameObject);
        }
        if (this.bLegend)
        {
            Myth_Legend_Info_DLG myth_Legend_Info_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MYTH_LEGEND_INFO_DLG) as Myth_Legend_Info_DLG;

            if (myth_Legend_Info_DLG != null)
            {
                myth_Legend_Info_DLG.InitSetCharKind(this.m_i32SelectCharKind);
            }
        }
        else
        {
            SolDetail_Info_Dlg solDetail_Info_Dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLDETAIL_DLG) as SolDetail_Info_Dlg;

            if (solDetail_Info_Dlg != null)
            {
                solDetail_Info_Dlg.SetElementGui();
            }
        }
        Resources.UnloadUnusedAssets();
        base.OnClose();
    }
    public override void CloseForm(IUIObject obj)
    {
        this.lb_name.Visible = false;
        this.DestroyLoadObject();
        NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(true);

        ItemMallDlg itemMallDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ITEMMALL_DLG) as ItemMallDlg;

        if (itemMallDlg != null)
        {
            itemMallDlg.SetShowData();
        }
        if (null != BugFixAudio.PlayOnceRoot)
        {
            int childCount = BugFixAudio.PlayOnceRoot.transform.childCount;
            for (int i = 0; i < childCount; i++)
            {
                Transform child = BugFixAudio.PlayOnceRoot.transform.GetChild(i);
                if (child != null)
                {
                    UnityEngine.Object.Destroy(child.gameObject);
                }
            }
        }
        TsAudio.RestoreMuteAllAudio();
        TsAudio.RefreshAllMuteAudio();
        base.CloseForm(obj);
    }
Пример #3
0
 private void SetActionReforge(WWWItem _item, object _param)
 {
     Main_UI_SystemMessage.CloseUI();
     if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset)
     {
         GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject;
         if (null != gameObject)
         {
             this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject);
             Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
             Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
             effectUIPos.z = 300f;
             this.rootGameObject.transform.position = effectUIPos;
             NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer);
             base.InteractivePanel.MakeChild(this.rootGameObject);
             this.aniGameObject      = this.rootGameObject.GetComponentInChildren <Animation>();
             this.bLoadActionReforge = true;
             if (TsPlatform.IsMobile && TsPlatform.IsEditor)
             {
                 NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject);
             }
             TsAudio.StoreMuteAllAudio();
             TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
             TsAudio.RefreshAllMuteAudio();
             NkInputManager.IsInputMode = false;
         }
     }
 }
Пример #4
0
 public void MythRaidBGMOn()
 {
     TsAudio.StoreMuteAllAudio();
     TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
     TsAudio.RefreshAllMuteAudio();
     TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "MYTH", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true);
 }
Пример #5
0
 private bool _Init()
 {
     TsAudio.LoadPlayerPrefs();
     TsAudio.RefreshAllAudioVolumes();
     TsAudio.RefreshAllMuteAudio();
     this._defaultAudioListenerSwitcher = new TsAudioListenerSwitcher(base.gameObject);
     if (Application.isPlaying)
     {
         this._currentAudioListenerSwitcher = null;
         AudioListener audioListener = this.SearchAndEnable_CurrentAudioListener();
         if (audioListener != null)
         {
             this._currentAudioListenerSwitcher = new TsAudioListenerSwitcher(audioListener.gameObject);
             if (this._currentAudioListenerSwitcher == null)
             {
                 TsLog.LogWarning("_currentAudioListenerSwitcher == null", new object[0]);
             }
         }
         else if (Camera.main != null)
         {
             this._currentAudioListenerSwitcher = new TsAudioListenerSwitcher(Camera.main.gameObject);
             if (this._currentAudioListenerSwitcher == null)
             {
                 TsLog.LogWarning("_currentAudioListenerSwitcher == null", new object[0]);
             }
         }
         if (this._currentAudioListenerSwitcher == null)
         {
             this._currentAudioListenerSwitcher = this._defaultAudioListenerSwitcher;
         }
         this._currentAudioListenerSwitcher.Switch();
         if (this.CurrentAudioListener == null)
         {
             TsLog.LogError("Failed~! Set Current AudioListener~!", new object[0]);
         }
     }
     else
     {
         this._defaultAudioListenerSwitcher.Switch();
     }
     if (Application.isEditor)
     {
         if (base.gameObject.GetComponent <TsAudioDebugger>() == null)
         {
             base.gameObject.AddComponent <TsAudioDebugger>();
         }
         if (base.gameObject.GetComponent <TsTestDownloadAtAudioContainer>() == null)
         {
             base.gameObject.AddComponent <TsTestDownloadAtAudioContainer>();
         }
     }
     if (this._tempclip == null)
     {
         this._tempclip = AudioClip.Create("tempclip", 44100, 1, 44100, false, false);
     }
     return(true);
 }
Пример #6
0
 public override void OnClose()
 {
     TsAudio.RestoreMuteAllAudio();
     TsAudio.RefreshAllMuteAudio();
     if (null != this.rootEffectGameObject)
     {
         UnityEngine.Object.Destroy(this.rootEffectGameObject);
     }
     base.OnClose();
 }
Пример #7
0
 public override void Update()
 {
     if (this.bLoadActionReforge && null != this.rootGameObject && null != this.aniGameObject && !this.aniGameObject.isPlaying)
     {
         UnityEngine.Object.DestroyImmediate(this.rootGameObject);
         this.bLoadActionReforge = false;
         this.bRequest           = false;
         this.aniGameObject      = null;
         TsAudio.RestoreMuteAllAudio();
         TsAudio.RefreshAllMuteAudio();
         this.SendServer();
         NkInputManager.IsInputMode = true;
     }
 }
Пример #8
0
    public void LoadMyth_Evolurion(NkSoldierInfo pkSolinfo, byte i8BaseGrade, byte i8ChangeGrade)
    {
        TsAudio.StoreMuteAllAudio();
        TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
        TsAudio.RefreshAllMuteAudio();
        this.m_pkSolinfo    = pkSolinfo;
        this.m_bBaseGrade   = i8BaseGrade;
        this.m_bChangeGrade = i8ChangeGrade;
        string  str     = string.Format("{0}", "Effect/Instant/fx_ui_shinhwacard" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);

        wWWItem.SetItemType(ItemType.USER_ASSETB);
        wWWItem.SetCallback(new PostProcPerItem(this.EvolutionSuccess), null);
        TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
    }
 public override void Show()
 {
     UIDataManager.MuteSound(false);
     TsAudio.StoreMuteAllAudio();
     TsAudio.SetExceptMuteAllAudio(EAudioType.SFX, true);
     TsAudio.RefreshAllMuteAudio();
     if (this.cardOpen == SolRecruitSuccess_RenewalDlg.eCardOpen.ONE)
     {
         TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "SOULCARD", "ONECARD", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, false);
     }
     else
     {
         TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "SOULCARD", "MANYCARD", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, false);
     }
     base.Show();
 }
Пример #10
0
 private void SoundMuteRestore()
 {
     if (null != BugFixAudio.PlayOnceRoot)
     {
         int childCount = BugFixAudio.PlayOnceRoot.transform.childCount;
         for (int i = 0; i < childCount; i++)
         {
             Transform child = BugFixAudio.PlayOnceRoot.transform.GetChild(i);
             if (child != null)
             {
                 UnityEngine.Object.Destroy(child.gameObject);
             }
         }
     }
     TsAudio.RestoreMuteAllAudio();
     TsAudio.RefreshAllMuteAudio();
 }
 public override void CloseForm(IUIObject obj)
 {
     if (null != BugFixAudio.PlayOnceRoot)
     {
         int childCount = BugFixAudio.PlayOnceRoot.transform.childCount;
         for (int i = 0; i < childCount; i++)
         {
             Transform child = BugFixAudio.PlayOnceRoot.transform.GetChild(i);
             if (child != null)
             {
                 UnityEngine.Object.Destroy(child.gameObject);
             }
         }
     }
     TsAudio.RestoreMuteAllAudio();
     TsAudio.RefreshAllMuteAudio();
     base.CloseForm(obj);
 }
Пример #12
0
 private void Set_Sound()
 {
     for (int i = 0; i < 10; i++)
     {
         if (i == 1 || i == 9)
         {
             if (this.m_MuteBgm.IsChecked())
             {
                 TsAudio.SetMuteAudioType((EAudioType)i, true);
             }
             else
             {
                 bool mute = false;
                 if (this.m_BgmSound.Value <= 0.001f)
                 {
                     mute = true;
                 }
                 TsAudio.SetMuteAudioType((EAudioType)i, mute);
                 TsAudio.SetVolumeOfAudioType((EAudioType)i, this.m_BgmSound.Value);
             }
         }
         else if (this.m_MuteEffect.IsChecked())
         {
             TsAudio.SetMuteAudioType((EAudioType)i, true);
         }
         else
         {
             bool mute2 = false;
             if (this.m_EffectSound.Value <= 0.001f)
             {
                 mute2 = true;
             }
             TsAudio.SetMuteAudioType((EAudioType)i, mute2);
             TsAudio.SetVolumeOfAudioType((EAudioType)i, this.m_EffectSound.Value);
         }
     }
     TsAudio.RefreshAllAudioVolumes();
     TsAudio.RefreshAllMuteAudio();
 }
Пример #13
0
    public void LoadLegendSolCompleteElement(SOLDIER_INFO pkSolInfo)
    {
        if (pkSolInfo == null)
        {
            return;
        }
        TsAudio.StoreMuteAllAudio();
        TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
        TsAudio.RefreshAllMuteAudio();
        this.bLegend             = true;
        this.m_pSolInfo          = pkSolInfo;
        this.m_i32SelectCharKind = pkSolInfo.CharKind;
        this.m_bSelectGrade      = pkSolInfo.Grade;
        this.m_bSelectGrade     += 1;
        this.m_bSelectSeason     = NrTSingleton <NrTableSolGuideManager> .Instance.GetCharKindSeason(pkSolInfo.CharKind);

        string  str     = string.Format("{0}", "UI/Soldier/fx_direct_dragonhero" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);

        wWWItem.SetItemType(ItemType.USER_ASSETB);
        wWWItem.SetCallback(new PostProcPerItem(this.SolRecruitSuccess), null);
        TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
    }
Пример #14
0
    public void ShowDirection(DirectionDLG.eDIRECTIONTYPE type, int sub_data = 0)
    {
        this.m_direction_type = type;
        if (!this.CheckDirection())
        {
            this.Close();
            return;
        }
        UIDataManager.MuteSound(true);
        string arg = string.Empty;

        this.SetDirection(this.m_direction_type);
        switch (this.m_direction_type)
        {
        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_COMMUNITY:
            arg = string.Format("{0}", "UI/Etc/fx_helpfriend" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 32f;
            break;

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_BABEL:
            this.m_nBabel_FloorType = (short)sub_data;
            if (PlayerPrefs.GetInt("BabelTowerMainDLG Effect") == 0)
            {
                arg = "Effect/Instant/fx_direct_chaostower" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 17f;
            }
            else
            {
                arg = "Effect/Instant/fx_towerloading" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 2.5f;
            }
            break;

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_PLUNDER:
        {
            arg = string.Format("{0}", "UI/Etc/fx_herobattle" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 32f;
            Vector3 position = new Vector3(0f, 0f, 0f);
            position.z = 200f;
            position.x = this.m_lSkip.transform.position.x;
            position.y = this.m_lSkip.transform.position.y;
            this.m_lSkip.transform.position = position;
            break;
        }

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_ITEMSKILL:
            arg = string.Format("{0}", "UI/item/fx_direct_improvemagic" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 22.2f;
            break;

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MINESEARCH:
        {
            if (sub_data == 1)
            {
                arg = "UI/Mine/fx_direct_forestroad" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 5f;
            }
            else if (sub_data == 2)
            {
                arg = "UI/Mine/fx_direct_iceroad" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 5f;
            }
            else if (sub_data == 3)
            {
                arg = "UI/Mine/fx_direct_goldroad" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 5f;
            }
            else if (sub_data == 4)
            {
                arg = "UI/Mine/fx_direct_goldroad" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 5f;
            }
            else if (sub_data == 5)
            {
                arg = "UI/Mine/fx_direct_goldroad" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
                this.m_EffectShowTime = 5f;
            }
            Vector3 position2 = new Vector3(0f, 0f, 0f);
            position2.z = 200f;
            position2.x = this.m_lSkip.transform.position.x;
            position2.y = this.m_lSkip.transform.position.y;
            this.m_lSkip.transform.position = position2;
            break;
        }

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MINETUTORIAL:
            arg = string.Format("{0}{1}{2}", "UI/Mine/", "fx_direct_minewar", NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 15f;
            break;

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_EXPLORATION:
            arg = string.Format("{0}{1}{2}", "UI/Exploration/", "fx_direct_exploreloding", NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 3f;
            break;

        case DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MYTHRAID:
            UIDataManager.MuteSound(false);
            TsAudio.StoreMuteAllAudio();
            TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true);
            TsAudio.RefreshAllMuteAudio();
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "MYTH", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true);
            arg = string.Format("{0}{1}{2}", "ui/mythicraid/", "fx_direct_mythraid", NrTSingleton <UIDataManager> .Instance.AddFilePath);
            this.m_EffectShowTime = 3f;
            break;
        }
        string  str     = string.Format("{0}", arg);
        WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);

        wWWItem.SetItemType(ItemType.USER_ASSETB);
        wWWItem.SetCallback(new PostProcPerItem(this.SetActionDirection), null);
        TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
    }