Exemplo n.º 1
0
    public void SetProgressValue(uint cur)
    {
        int next = ArenaLevelData.GetNextLevelCreditNeed(MogoWorld.thePlayer.arenicGrade, (int)cur);

        m_progress.GetComponent <UISlider>().sliderValue           = ((float)cur) / next;
        m_progress.GetComponentsInChildren <UILabel>(true)[0].text = String.Concat(cur, '/', next);
    }
Exemplo n.º 2
0
 /// <summary>
 /// 设置被挑战玩家勋章和称号
 /// </summary>
 /// <param name="level"></param>
 void SetArenaPlayerMedal(int level)
 {
     m_playerMedalIcon.GetComponent <UISlicedSprite>().spriteName = ArenaLevelData.GetCurTitleIcon(level);
     if (m_playerMedalIcon.GetComponent <UISlicedSprite>().atlas.GetSprite(ArenaLevelData.GetCurTitleIcon(level)) == null)
     {
         m_playerMedalIcon.GetComponent <UISlicedSprite>().spriteName = "gradeicon00";
     }
     m_playerMedalTitle.GetComponent <UILabel>().text = ArenaLevelData.GetCurTitle(level);
 }
Exemplo n.º 3
0
 public void SetHeadImage(ushort level)
 {
     LoggerHelper.Debug(ArenaLevelData.GetCurTitleIcon(level));
     m_head.GetComponent <UISlicedSprite>().spriteName = ArenaLevelData.GetCurTitleIcon(level);
     if (m_head.GetComponent <UISlicedSprite>().atlas.GetSprite(ArenaLevelData.GetCurTitleIcon(level)) == null)
     {
         m_head.GetComponent <UISlicedSprite>().spriteName = "gradeicon00";
     }
 }
Exemplo n.º 4
0
    /// <summary>
    /// 设置玩家勋章进度
    /// </summary>
    /// <param name="curCredit"></param>
    public void SetPlayerMedalProgressValue(uint curCredit)
    {
        int   nextCredit = ArenaLevelData.GetNextLevelCreditNeed(MogoWorld.thePlayer.arenicGrade, (int)curCredit);
        float progress   = ((float)curCredit) / nextCredit;

        progress = Math.Min(1, progress);
        progress = Math.Max(0, progress);
        m_spArenaUITitleProgressBar.fillAmount = progress;
        m_lblArenaUITitleProgressBarNum.text   = String.Concat(curCredit, '/', nextCredit);
    }
Exemplo n.º 5
0
    public void SetAttrData()
    {
        if (m_view != null)
        {
            m_view.SetNameText(MogoWorld.thePlayer.name);
            m_view.SetBattleForceText(MogoWorld.thePlayer.fightForce);
            m_view.SetCurTitleText(MogoWorld.thePlayer.arenicGrade);
            m_view.SetNextTitleText(MogoWorld.thePlayer.arenicGrade);
            m_view.SetProgressValue(MogoWorld.thePlayer.arenicCredit);
            m_view.SetHeadImage(MogoWorld.thePlayer.arenicGrade);

            // 设置PVP等级信息
            m_view.SetPVPLevelTipInfoCurTitle(ArenaLevelData.GetCurTitle(MogoWorld.thePlayer.arenicGrade));
            m_view.SetPVPLevelTipInfoCurPVPNum1(ArenaLevelData.GetCurPVPAddition(MogoWorld.thePlayer.arenicGrade));
            m_view.SetPVPLevelTipInfoCurPVPNum2(ArenaLevelData.GetCurPVPAnti(MogoWorld.thePlayer.arenicGrade));

            m_view.SetPVPLevelTipInfoNextTitle(ArenaLevelData.GetNextTitle(MogoWorld.thePlayer.arenicGrade));
            m_view.SetPVPLevelTipInfoNextPVPNum1(ArenaLevelData.GetNextPVPAddition(MogoWorld.thePlayer.arenicGrade));
            m_view.SetPVPLevelTipInfoNextPVPNum2(ArenaLevelData.GetNextPVPAnti(MogoWorld.thePlayer.arenicGrade));
        }
    }
Exemplo n.º 6
0
 public void SetNextTitleText(ushort level)
 {
     m_nextTitle.GetComponent <UILabel>().text = ArenaLevelData.GetNextTitle(level);
 }
Exemplo n.º 7
0
 /// <summary>
 /// 设置玩家勋章名称
 /// </summary>
 /// <param name="title"></param>
 public void SetPlayerMedalTitle(ushort grade)
 {
     m_lblArenaUIPlayerMedalTitle.text = ArenaLevelData.GetCurTitle(grade);
 }