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)); } }
/// <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)); } }
public void SetCombatTime(int second) { if (second <= 15) { TweenLeftTimeColor(); } if (second == 1) { StopTweenLeftTimeColor(); } if (MyHead.HourGlassLeftTime != null) { MyHead.HourGlassLeftTime.text = NdUtil.TimeFormat(second); } }
void SetAttackTime(int leftTime) { MyHead.HourGlassLeftTime.text = NdUtil.TimeFormat(leftTime); }