Esempio n. 1
0
    /// <summary>
    /// 刷新Boss上轮战况信息
    /// </summary>
    void RefreshBossPreRoundInfo(uint id)
    {
        if (previousBossID != id)
        {
            return;
        }
        JvBaoBossWorldManager dmgr = DataManager.Manager <JvBaoBossWorldManager>();
        string tempTxt             = "--";

        JvBaoBossWorldManager.LocalWorldBossInfo info = null;
        if (dmgr.TryGetWorldBossStatusInfo(id, out info) && !string.IsNullOrEmpty(info.LastDam))
        {
            tempTxt = info.LastDam;
        }
        if (null != m_label_PreRoundLastAttackName)
        {
            m_label_PreRoundLastAttackName.text = tempTxt;
        }

        if (null != m_label_PreRoundMaxDamName)
        {
            if (null != info && !string.IsNullOrEmpty(info.MaxDam))
            {
                tempTxt = info.MaxDam;
            }
            else
            {
                tempTxt = "--";
            }

            m_label_PreRoundMaxDamName.text = tempTxt;
        }
    }
Esempio n. 2
0
    void SetBossState(TreasureBossDataBase tabData)
    {
        string msg   = "";
        bool   match = false;

        if (tabData.bossType == 1)
        {
            m_lab_lv.text = tabData.bossLv.ToString();
            match         = MainPlayerHelper.GetPlayerLevel() >= tabData.lvLimit;
            msg           = match ? DataManager.Manager <TextManager>().GetLocalText(LocalTextType.HuntingBoss_KeTiaoZhan) :
                            DataManager.Manager <TextManager>().GetLocalText(LocalTextType.HuntingBoss_WeiJieSuo);

            CopyInfo info = DataManager.Manager <ComBatCopyDataManager>().GetCopyInfoById(tabData.copyID);
            if (info != null)
            {
                m_spr_hadKilled.gameObject.SetActive(info.CopyUseNum >= info.MaxCopyNum);
            }
        }
        else
        {
            if (null != m_spr_hadKilled && m_spr_hadKilled.gameObject.activeSelf)
            {
                m_spr_hadKilled.gameObject.SetActive(false);
            }
            uint worldLv  = DataManager.Manager <MailManager>().WorldLevel;
            uint targetLv = (worldLv >= tabData.bossLv) ? worldLv : tabData.bossLv;
            m_lab_lv.text = targetLv.ToString();

            msg = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.HuntingBoss_NotOpen);
            JvBaoBossWorldManager.LocalWorldBossInfo tempInfo = null;
            if (DataManager.Manager <JvBaoBossWorldManager>().TryGetWorldBossStatusInfo(tabData.ID, out tempInfo))
            {
                switch (tempInfo.Status)
                {
                case JvBaoBossWorldManager.JvBaoBossStatus.JBS_NotOpen:
                    msg = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.HuntingBoss_NotOpen);
                    break;

                case JvBaoBossWorldManager.JvBaoBossStatus.JBS_CommingSoon:
                    msg = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.HuntingBoss_ShuaXinShiJian, tabData.uiRefreshTime);
                    break;

                case JvBaoBossWorldManager.JvBaoBossStatus.JBS_Attack:
                    msg = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.HuntingBoss_GongJiZhong);
                    break;

                case JvBaoBossWorldManager.JvBaoBossStatus.JBS_Finish:
                    msg = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.HuntingBoss_End);
                    break;
                }
            }
        }
        m_lab_bossState.text = msg;
    }