Ejemplo n.º 1
0
    // ===================================== //
    // public - [Event] Function             //
    // 프랜드 객체가 요청                    //
    // ===================================== //

    public void EventSetINI(SINI_Sound[] arrSoundINI, float fMainVolume, EVolumeOff eVolumeOff)
    {
        if (arrSoundINI == null)
        {
            Debug.LogWarning("에러, INI 세팅 바람");
            return;
        }

        _fVolumeEffect = fMainVolume;
        _eVolumeOff    = eVolumeOff;
        for (int i = 0; i < arrSoundINI.Length; i++)
        {
            SINI_Sound sSoundInfo = arrSoundINI[i];
            if (sSoundInfo.strSoundName == "")
            {
                continue;
            }

            try
            {
                ENUM_SOUND_NAME eSoundName = (ENUM_SOUND_NAME)System.Enum.Parse(typeof(ENUM_SOUND_NAME), arrSoundINI[i].strSoundName);
                _mapSoundVolume[eSoundName] = sSoundInfo.fVolume;
                if (_mapGroupSound.ContainsKey(sSoundInfo.iGroupNumber) == false)
                {
                    _mapGroupSound.Add(sSoundInfo.iGroupNumber, new List <ENUM_SOUND_NAME>());
                }

                _mapGroupSound[sSoundInfo.iGroupNumber].Add(eSoundName);
            }
            catch
            {
                Debug.LogWarning(string.Format("Sound INI 파일에 {0}에 없는 파일이 존재합니다. {1}", typeof(ENUM_SOUND_NAME).ToString(), arrSoundINI[i].strSoundName));
            }
        }
    }
Ejemplo n.º 2
0
    public void EventSetSoundOption(SINI_Sound[] arrSoundINI, float fMainVolume, EVolumeOff eVolumeOff)
    {
        if (arrSoundINI == null)
        {
            Debug.LogWarning("에러, INI 세팅 바람");
            return;
        }

        _fVolumeEffect = fMainVolume;
        _eVolumeOff    = eVolumeOff;
        for (int i = 0; i < arrSoundINI.Length; i++)
        {
            SINI_Sound sSoundInfo = arrSoundINI[i];
            if (sSoundInfo.strSoundName == "")
            {
                continue;
            }

            try
            {
                _mapSoundVolume[sSoundInfo.strSoundName] = sSoundInfo.fVolume;
                if (_mapGroupSound.ContainsKey(sSoundInfo.iGroupNumber) == false)
                {
                    _mapGroupSound.Add(sSoundInfo.iGroupNumber, new List <string>());
                }

                _mapGroupSound[sSoundInfo.iGroupNumber].Add(sSoundInfo.strSoundName);
            }
            catch
            {
                Debug.LogWarning(string.Format("Sound INI에 없는 파일이 존재합니다. {0}", sSoundInfo.strSoundName));
            }
        }
    }