Пример #1
0
    void RefreshUI()
    {
        int currentPhysics = UserDC.GetPhysical();
        int total          = UserM.GetMaxPhysical(UserDC.GetLevel());

        if (currentPhysics >= total)
        {
            SetType(0);
        }
        else
        {
            SetType(1);
        }

        int serverTime = GlobalTimer.GetNowTimeInt();

        NGUIUtil.SetLableText <string>(MyHead.LblTime, NdUtil.ConvertServerTime(serverTime));
        if (m_iType == 1)
        {
            int resumePhysicsTime = GlobalTimer.instance.GetPhysicsResumeCounter();
            NGUIUtil.SetLableText <string>(MyHead.LblNextResumeTime, NdUtil.TimeFormat(resumePhysicsTime));

            int resumePhysicsAllTime = GlobalTimer.instance.GetPhysicsResumeAllCounter();
            NGUIUtil.SetLableText <string>(MyHead.LblResumeAllTime, NdUtil.TimeFormat(resumePhysicsAllTime));
        }
    }
Пример #2
0
    /// <summary>
    /// 每秒刷新技能点恢复倒计时
    /// </summary>
    private void RefreshUIBySecond()
    {
        int resumeSkillTime = GlobalTimer.instance.GetSkillResumeCounter();

        if (m_wndType == 1)
        {
            string timeStr = string.Format("({0})", NdUtil.TimeFormat(resumeSkillTime));
            NGUIUtil.SetLableText <string>(MyHead.LblResumeTimeNotFull, timeStr);
        }
        else if (m_wndType == 2)
        {
            NGUIUtil.SetLableText <string>(MyHead.LblResumeTimeEmpty, NdUtil.TimeFormat(resumeSkillTime));
        }
    }
Пример #3
0
    public void SetCombatTime(int second)
    {
        if (second <= 15)
        {
            TweenLeftTimeColor();
        }
        if (second == 1)
        {
            StopTweenLeftTimeColor();
        }

        if (MyHead.HourGlassLeftTime != null)
        {
            MyHead.HourGlassLeftTime.text = NdUtil.TimeFormat(second);
        }
    }
Пример #4
0
 void SetAttackTime(int leftTime)
 {
     MyHead.HourGlassLeftTime.text = NdUtil.TimeFormat(leftTime);
 }