Beispiel #1
0
 public override void OnPrepareSceneChange()
 {
     NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType());
     NrLoadPageScreen.StepUpMain(1);
     UIDataManager.MuteBGM    = TsAudio.IsMuteAudio(EAudioType.BGM);
     UIDataManager.MuteEffect = TsAudio.IsMuteAudio(EAudioType.SFX);
 }
Beispiel #2
0
 public override void OnPrepareSceneChange()
 {
     UnityEngine.Debug.Log(string.Concat(new object[]
     {
         "!!!!! ScreenSize Width : ",
         Screen.width,
         ", Height, : ",
         Screen.height
     }));
     NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType());
     NrLoadPageScreen.StepUpMain(1);
     if (NrTSingleton <NrMainSystem> .Instance.m_ReLogin)
     {
         NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_LOADINGPAGE);
     }
     NrLoadPageScreen.ShowHideLoadingImg(false);
     UIDataManager.MuteBGM    = TsAudio.IsMuteAudio(EAudioType.BGM);
     UIDataManager.MuteEffect = TsAudio.IsMuteAudio(EAudioType.SFX);
     if (null == NmMainFrameWork.loginCamera)
     {
         NmMainFrameWork.loginCamera      = (Camera)UnityEngine.Object.Instantiate(Camera.main);
         NmMainFrameWork.loginCamera.name = "loginCamera";
         NmMainFrameWork.loginCamera.gameObject.SetActive(false);
         Transform child = NmMainFrameWork.loginCamera.transform.GetChild(0);
         if (null != child)
         {
             UnityEngine.Object.Destroy(child.gameObject);
         }
         UnityEngine.Object.DontDestroyOnLoad(NmMainFrameWork.loginCamera);
     }
     NrTSingleton <NkBattleReplayManager> .Instance.Init();
 }
Beispiel #3
0
 public static void AddBGM()
 {
     if (TsAudio.IsMuteAudio(EAudioType.BGM))
     {
         return;
     }
     if (NmMainFrameWork.MobileStartBGM == null)
     {
         NmMainFrameWork.MobileStartBGM = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(NrTSingleton <UIDataManager> .Instance.FilePath + "Prefabs/00-SOUND-BGM-CUSTOMOZING-LOGIN"));
         NmMainFrameWork.MobileStartBGM.transform.parent = TsImmortal.gameObject.transform;
     }
 }
Beispiel #4
0
    public static void PlayMovieURL(string Path, bool bShowToast = true, bool bFile = false, bool isSkip = true)
    {
        float num;

        if (TsAudio.IsMuteAudio(EAudioType.BGM))
        {
            num = 0f;
        }
        else
        {
            num = TsAudio.GetVolumeOfAudio(EAudioType.BGM);
        }
        if (bFile && TsPlatform.IsIPhone)
        {
            NrTSingleton <NrUserDeviceInfo> .Instance.PlayMovieAtPath(Path, num);
        }
        else
        {
            NrTSingleton <NrUserDeviceInfo> .Instance.PlayMovieURL(Path, Color.black, bShowToast, num, isSkip);
        }
    }
    private void LoadOption()
    {
        TsQualityManager.Level currLevel = TsQualityManager.Instance.CurrLevel;
        int num;

        if (currLevel == TsQualityManager.Level.HIGH || currLevel == TsQualityManager.Level.HIGHEST)
        {
            num = 0;
        }
        else if (currLevel == TsQualityManager.Level.LOW || currLevel == TsQualityManager.Level.LOWEST)
        {
            num = 2;
        }
        else
        {
            num = 1;
        }
        this.m_Quality[num].Value = true;
        try
        {
            float volumeOfAudio = TsAudio.GetVolumeOfAudio(EAudioType.SFX);
            this.m_EffectSound.defaultValue = volumeOfAudio;
            this.m_EffectSound.Value        = volumeOfAudio;
            this.m_fOldSFX = volumeOfAudio;
        }
        catch (Exception)
        {
            this.m_EffectSound.Value = 1f;
        }
        try
        {
            bool flag = TsAudio.IsMuteAudio(EAudioType.SFX);
            this.m_MuteEffect.SetCheckState((!flag) ? 0 : 1);
            this.m_bOldSFX           = flag;
            UIDataManager.MuteEffect = flag;
        }
        catch (Exception)
        {
            this.m_MuteEffect.SetCheckState(0);
        }
        try
        {
            float volumeOfAudio2 = TsAudio.GetVolumeOfAudio(EAudioType.BGM);
            this.m_BgmSound.defaultValue = volumeOfAudio2;
            this.m_BgmSound.Value        = volumeOfAudio2;
            this.m_fOldBGM = volumeOfAudio2;
        }
        catch (Exception)
        {
            this.m_BgmSound.Value = 1f;
        }
        try
        {
            bool flag2 = TsAudio.IsMuteAudio(EAudioType.BGM);
            this.m_MuteBgm.SetCheckState((!flag2) ? 0 : 1);
            this.m_bOldBGM        = flag2;
            UIDataManager.MuteBGM = flag2;
        }
        catch (Exception)
        {
            this.m_MuteBgm.SetCheckState(0);
        }
        this.m_cbVibeAlarm.SetCheckState(PlayerPrefs.GetInt(NrPrefsKey.OPTION_VIBE_ON_OFF, 0));
    }