Ejemplo n.º 1
0
    public void ChangeShowInfoPaoShangChange()
    {
        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        int _OriginalReliveNum = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_ORIGINAL_NUMBER) + 1;
        //int _YuanBao = 10 + _OriginalReliveNum * 5;
        //if (_OriginalReliveNum > 8)
        //{
        //    _YuanBao = 50;
        //}
        int _YuanBao      = (int)Mathf.Min(100.0f, 10.0f * Mathf.Ceil((float)_OriginalReliveNum * 0.5f));
        int nPSFuhuoTimes = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_PAOSHANG_FUHUOTIMES);

        if (_mainPlayer.IsInPaoShang() &&
            nPSFuhuoTimes < 3)  //跑商下 显示 跑商免费复活
        {
            m_ReliveYuanBao.text = StrDictionary.GetClientDictionaryString("#{3950}", 3 - nPSFuhuoTimes, 3);
        }
        else
        {
            m_ReliveYuanBao.text = StrDictionary.GetClientDictionaryString("#{1034}", _YuanBao);
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        if (m_MiniAnchorPoint.activeInHierarchy)
        {
            m_ButtonPanel.transform.parent        = m_MiniAnchorPoint.transform;
            m_ButtonPanel.transform.localPosition = new Vector3(0, 0, 0);
        }

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

        if (_mainPlayer == null)
        {
            return;
        }
        m_NewPlayerRelive.SetActive(false);
        m_Relive.SetActive(false);
        if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < 30 &&
            GameManager.gameManager.RunningScene != (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_GUILDWAR) //帮战副本不出现新手复活
        {
            m_NewPlayerRelive.SetActive(true);
            m_ReliveYuanBao.text = "";
        }
        else
        {
            m_Relive.SetActive(true);
            int _OriginalReliveNum = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_ORIGINAL_NUMBER) + 1;
            //int _YuanBao = 10 + _OriginalReliveNum * 5;
            int _YuanBao = (int)Mathf.Min(100.0f, 10.0f * Mathf.Ceil((float)_OriginalReliveNum * 0.5f));
            //if (_OriginalReliveNum > 8)
            //{
            //    _YuanBao = 50;
            //}
            int nPSFuhuoTimes = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_PAOSHANG_FUHUOTIMES);
            if (_mainPlayer.IsInPaoShang() &&
                nPSFuhuoTimes < 3)  //跑商下 显示 跑商免费复活
            {
                m_ReliveYuanBao.text = StrDictionary.GetClientDictionaryString("#{3950}", 3 - nPSFuhuoTimes, 3);
            }
            else
            {
                m_ReliveYuanBao.text = StrDictionary.GetClientDictionaryString("#{1034}", _YuanBao);
            }
        }
        InvokeRepeating("DoSomeThing", 0, 1);
    }