Example #1
0
    // ========================================================================== //

    /* public - [Do] Function
     * 외부 객체가 호출(For External class call)*/

    public void DoInit(MonoBehaviour pBaseClass, string strFolderPath)
    {
        _mapPreParsingObject.Clear();
        if (_pManagerParserJson == null)
        {
            _pManagerParserJson = SCManagerParserJson.DoMakeInstance(pBaseClass, strFolderPath, EResourcePath.Resources);
        }

        List <KeyValuePair <string, TextAsset> > listResource = _pManagerParserJson.p_mapResourceOrigin.ToList();

        System.Type pType = typeof(T_Key);
        if (pType.IsEnum)
        {
            for (int i = 0; i < listResource.Count; i++)
            {
                KeyValuePair <string, TextAsset> pKey = listResource[i];
                T_Key tKey = pKey.Key.ConvertEnum <T_Key>();
                Class_PreParsingType pData;
                if (_pManagerParserJson.DoReadJson_FromResource(tKey, out pData))
                {
                    _mapPreParsingObject.Add(tKey, pData);
                }
                else
                {
                    System.Type pTypeClass = typeof(Class_PreParsingType);
                    Debug.LogWarningFormat("[Error] SCManagerPreParserJson<{0}, {1}>.Parsing Fail Key : {2}", pType.Name, pTypeClass, tKey);
                }
            }
        }
        else
        {
            for (int i = 0; i < listResource.Count; i++)
            {
                KeyValuePair <string, TextAsset> pKey = listResource[i];
                T_Key tKey = (T_Key)(object)pKey.Key;
                Class_PreParsingType pData;
                if (_pManagerParserJson.DoReadJson_FromResource(tKey, out pData))
                {
                    _mapPreParsingObject.Add(tKey, pData);
                }
            }
        }
    }
Example #2
0
    private void ProcParse_UserSetting()
    {
        if (_pJsonParser_Persistent.DoReadJson_FromResource(EINI_JSON_FileName.UserSetting, out _pSetting_User) == false)
        {
            Debug.Log("UserInfo - bParsingResult is Fail");

            _pSetting_User = new SINI_UserSetting();
            _pJsonParser_Persistent.DoWriteJson(EINI_JSON_FileName.UserSetting, _pSetting_User);
        }

        CManagerSound.instance.DoSetVolumeEffect(_pSetting_User.fVolumeEffect);
        CManagerSound.instance.DoSetVolumeBGM(_pSetting_User.fVolumeBGM);
    }
Example #3
0
    /* public - [Event] Function
     * 프랜드 객체가 호출                       */

    // ========================================================================== //

    /* private - [Proc] Function
     * 중요 로직을 처리                         */

    static private void Check_And_InitManagerLogin()
    {
        if (_pObjectDummy_ForCoroutine != null)
        {
            return;
        }

        GameObject pObjectDummy = new GameObject("ManagerLogInDummy_ForCoroutine");

        _pObjectDummy_ForCoroutine = pObjectDummy.AddComponent <CCompoTemp>();

        _pManagerJson = SCManagerParserJson.DoMakeInstance(_pObjectDummy_ForCoroutine, const_strLocalPath_INI, EResourcePath.PersistentDataPath);
        if (_pManagerJson.DoReadJson_FromResource <string, SINI_Account>(const_strLogInFileName, out _pLoginInfo) == false)
        {
            _pLoginInfo = new SINI_Account();
            _pManagerJson.DoWriteJson <string>(const_strLogInFileName, _pLoginInfo);
        }
        else
        {
            _strEmailAddress = _pLoginInfo.strEmailAddress;
            _strPassword     = _pLoginInfo.strPassword;
        }
    }