Exemple #1
0
    /// <summary>
    /// 根据玩家GUID获得当前对应美人配置
    /// </summary>
    /// <returns></returns>
    public static BelleConfigData GetBelleConfigDataByGUID()
    {
        Dictionary <string, BelleConfigData> _belleConfigData = UserConfigData.GetBelleConfigData();

        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        BelleConfigData m_belleConfigData = null;

        if (null != _belleConfigData)
        {
            //Debug.Log("fanzhipeng -----------------------------------------------  " + PlayerPreferenceData.LastRoleGUID);
            //  Debug.Log("fanzhipeng  ---------------------------------------------------  _mainPlayer != null " + _mainPlayer.GUID);
            if (_belleConfigData.ContainsKey(PlayerPreferenceData.LastRoleGUID.ToString()))
            {
                //  Debug.Log("fanzhipeng  --------------------------------                                ContainKye  " + _mainPlayer.GUID);
                m_belleConfigData = _belleConfigData[PlayerPreferenceData.LastRoleGUID.ToString()];
                //Debug.Log("fanzhipeng ---------------------------------------------------------------------------- contains");
                //  Debug.Log("fanzhipeng ------------------------------------------------------------------ m_belleConfigData         ==== " + m_belleConfigData.BelleGetBits);
            }
        }

        if (null == _mainPlayer)
        {
            //Debug.Log("fanzhipeng  -------------------------------------------------  null == _mainPlayer");
        }

        return(m_belleConfigData);
    }
Exemple #2
0
    /// <summary>
    /// 设置当前获得的美人配置
    /// </summary>
    /// <param name="belleCount"></param>
    public static void SetBelleActiveCount(int belleCount)
    {
        Dictionary <string, BelleConfigData> _belleConfigData = UserConfigData.GetBelleConfigData();

        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        BelleConfigData m_belleConfigData = null;

        if (null != _mainPlayer && null != _belleConfigData)
        {
            if (_belleConfigData.ContainsKey(_mainPlayer.GUID.ToString()))
            {
                m_belleConfigData             = _belleConfigData[_mainPlayer.GUID.ToString()];
                m_belleConfigData.ActiveCount = belleCount;
            }
        }

        UserConfigData.AddBelleConfigInfo(_mainPlayer.GUID.ToString(), m_belleConfigData);
    }