Beispiel #1
0
    /// <summary>
    /// 加载声音配置
    /// </summary>
    private static bool LoadSoundConfig(ref Dictionary <int, SoundConfigData> dataSet)
    {
        if (dataSet == null)
        {
            SoundSystemLog("参数dataset为null");
            return(false);
        }

        string patch = ViewConfigManager.GetConfigFullPath(ConfigFileName);

        ScpReader SoundReader = new ScpReader(patch, true, 2);

        // 遍歷整個表并存儲起來
        for (int i = 0; i < SoundReader.GetRecordCount(); ++i)
        {
            SoundConfigData data = new SoundConfigData();
            data.nID                       = SoundReader.GetInt(i, (int)SoundConfigCol.COL_ID, 0);
            data.soundType                 = (EMSoundType)SoundReader.GetInt(i, (int)SoundConfigCol.COL_Type, 2);
            data.mixerGroupType            = (AudioMixerGroupType)SoundReader.GetInt(i, (int)SoundConfigCol.COL_MixerGroupType, 1);
            data.nMixerGroupIndex          = SoundReader.GetInt(i, (int)SoundConfigCol.COL_MixerGroupIndex, 0);
            data.bBypassEffect             = SoundReader.GetInt(i, (int)SoundConfigCol.COL_BypassEffect, 0) > 0;
            data.bBypassReverbZone         = SoundReader.GetInt(i, (int)SoundConfigCol.COL_BypassReverbZone, 0) > 0;
            data.bPlayOnAwake              = SoundReader.GetInt(i, (int)SoundConfigCol.COL_PlayOnAwake, 1) > 0;
            data.nPriority                 = Mathf.Clamp(SoundReader.GetInt(i, (int)SoundConfigCol.COL_Priority, 128), 0, 256);
            data.fPitch                    = Mathf.Clamp(SoundReader.GetFloat(i, (int)SoundConfigCol.COL_Pitch, 1), -3.0f, 3.0f);
            data.fStereoPan                = Mathf.Clamp(SoundReader.GetFloat(i, (int)SoundConfigCol.COL_StereoPan, 0), -1.0f, 1.0f);
            data.fReverZoneMix             = Mathf.Clamp(SoundReader.GetFloat(i, (int)SoundConfigCol.COL_ReverZoneMix, 1), 0, 1.1f);
            data.b3DSound                  = SoundReader.GetInt(i, (int)SoundConfigCol.COL_3DSound, 1) > 0;
            data.fDopplerLv                = Mathf.Clamp(SoundReader.GetFloat(i, (int)SoundConfigCol.COL_DopplerLv, 1), 0, 5.0f);
            data.nSpread                   = Mathf.Clamp(SoundReader.GetInt(i, (int)SoundConfigCol.COL_Spread, 0), 0, 360);;
            data.audioRoffType             = (AudioRolloffMode)SoundReader.GetInt(i, (int)SoundConfigCol.COL_RolloffMode, 0);
            data.fMinDistance              = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_MinDistance, 1);
            data.fMaxDistance              = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_MaxDistance, 15);
            data.nPlayTimes                = SoundReader.GetInt(i, (int)SoundConfigCol.COL_PlayTimes, 1);
            data.fDuartion                 = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_Duartion, 0);
            data.fDelayPlayTime            = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_DelayTime, 0);
            data.fIntervalBetweenPlayTimes = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_IntervalBetweenPlayTimes, 0);
            data.AssetBundleName           = SoundReader.GetString(i, (int)SoundConfigCol.COL_AssetBundleName, "");
            data.AssetName                 = SoundReader.GetString(i, (int)SoundConfigCol.COL_AssetName, "");
            data.AssetGUID                 = SoundReader.GetString(i, (int)SoundConfigCol.COL_AssetGUID, "");
            data.AssetSize_X               = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_AssetSize_X, -1);
            data.AssetSize_Y               = SoundReader.GetFloat(i, (int)SoundConfigCol.COL_AssetSize_Y, -1);
            data.szDependAssetGUID         = SoundReader.GetString(i, (int)SoundConfigCol.COL_DependAssetGUID, "");
            if (dataSet.ContainsKey(data.nID))
            {
                SoundSystemLog(ConfigFileName + "拥有重复的ID!");
                dataSet[data.nID] = data;
            }
            else
            {
                CheckConfig(data);
                dataSet.Add(data.nID, data);
            }
        }
        SoundReader.Dispose();
        SoundReader = null;
        return(true);
    }
Beispiel #2
0
        public override bool Init(IUISubWnd wnd)
        {
            base.Init(wnd);

            EntityView curHeroView = EntityFactory.MainHeroView;

            InitSpellSlotConfigCsv(ViewConfigManager.GetConfigFullPath("SpellSlot.csv", true));
            //SettingKeyCodeInfo(curHeroView);

            return(true);
        }
    public override void OnEnter()
    {
        PlayerSettingLocalConfig.Instance.Load(ViewConfigManager.GetConfigFullPath("PlayerLocalSetting.csv", false));

        ImageSetting.Init();

        PerformanceCheckManager.Instance.flowShareData.oldAsyncCout   = QualitySettings.vSyncCount;
        PerformanceCheckManager.Instance.flowShareData.oldTargetFrame = Application.targetFrameRate;

        QualitySettings.vSyncCount = 0;

        ImageSetting.SetResolution(ImageSetting.systemResolutions, true, true);
        PerformanceCheckManager.Instance.flowShareData.currentCheckTime = PerformanceCheckManager.HoldDuringCheckTime;
        PerformanceCheckManager.Instance.flowShareData.StartCheckTimer  = true;
        PerformanceCheckManager.Instance.flowShareData.CheckUI.OnUpdate();
    }
Beispiel #4
0
    void ExportInfo()
    {
        PerformanceCheckManager.PerformanceCheckReslut result = PerformanceCheckManager.Instance.ReslutData;
        string path = ViewConfigManager.GetConfigFullPath(PerformanceCheckManager.confingFileName, false);

        System.IO.StreamWriter writer = new System.IO.StreamWriter(path, false, new System.Text.UTF8Encoding(true));


        string s = "";

        s = "PerformanceCheckVersion" + "," + PerformanceCheckManager.currPerformanceCheckVersion;
        writer.WriteLine(s);

        s = "Fps" + "," + PerformanceCheck_FPS.currFPS;
        writer.WriteLine(s);

        s = "NotDoPerformanceCheck" + "," + result.NotDoPerformanceCheck;
        writer.WriteLine(s);

        s = "VeryLowMachine" + "," + result.VeryLowMachine;
        writer.WriteLine(s);

        s = "notSupportRT" + "," + result.notSupportRT;
        writer.WriteLine(s);

        s = "notSupportHighLevel" + "," + result.notSupportHighLevel;
        writer.WriteLine(s);

        s = "GeometricRenderLevel" + "," + result.GeometricRenderLevel;
        writer.WriteLine(s);

        s = "ImageEffectRenderLevel" + "," + result.ImageEffectRenderLevel;
        writer.WriteLine(s);

        s = "ReslutImageFlags" + "," + flag;
        writer.WriteLine(s);

        writer.Flush();
        writer.Close();
        writer = null;
    }
Beispiel #5
0
    private int GetPerformanceCheckVersion()
    {
        int    version             = -1;
        string confingFileNamePath = ViewConfigManager.GetConfigFullPath(PerformanceCheckManager.confingFileName, false);

        if (!System.IO.File.Exists(confingFileNamePath))
        {
            return(version);
        }

        string stSchemeAllText = System.IO.File.ReadAllText(confingFileNamePath);

        //去掉\n,因为ScpReader以"\r"分割
        stSchemeAllText = stSchemeAllText.Replace("\n", "");
        //再干掉最后的"\r"
        stSchemeAllText = stSchemeAllText.Remove(stSchemeAllText.Length - 1, 0);
        ScpReader packageReader = new ScpReader(stSchemeAllText, "per", 0);

        version = packageReader.GetInt(0, 1, -1);

        return(version);
    }
Beispiel #6
0
 public void Load(string stPath)
 {
     InitPlayerLocalHeroCsv(ref m_SkinScpDataMap, ViewConfigManager.GetConfigFullPath("PlayerLocalHeroConfig.csv", true), true);
 }
Beispiel #7
0
 public void Load(string strPath)
 {
     _LoadGuideNodeConfig(ViewConfigManager.GetConfigFullPath("GuideConfig.csv"));
     _LoadGuideStateConfig(ViewConfigManager.GetConfigFullPath("GuideStateConfig.csv"));
 }