/// <summary> /// 设置游戏时间 /// </summary> /// <param name="value"></param> public void SetTime(float value) { var tmpStr = ""; if (value >= 0) { if (value > 300) { tmpStr = GameTimerManager.GetTime(value); } else { tmpStr = String.Format("<color=#FF0000>{0}</color>", GameTimerManager.GetTime(value)); } } else { tmpStr = "您超越时间极限"; } if (null != lb_time) { lb_time.text = tmpStr; } }
/// <summary> /// 刷新剩余 /// </summary> /// <param name="deltime"></param> private void _TickCenter(float deltime) { _leftTime -= deltime; if (_leftTime > 0) { if (null != this.lb_letfTime) { lb_letfTime.text = GameTimerManager.GetTime(_leftTime); } } else { _controller.setVisible(false); } }