public void ShowHitCD(bool isShow, int secondNum = 0, Action action = null) { m_goDragonMatchUIHitCD.SetActive(isShow); if (isShow) { if (m_hitCDCountDown != null) m_hitCDCountDown.Release(); m_hitCDCountDown = new MogoCountDown(m_lblDragonMatchUIHitCDNum, secondNum, "", "", "", MogoCountDown.TimeStringType.UpToMinutes, () => { if (action != null) action(); }); } else { if (m_hitCDCountDown != null) m_hitCDCountDown.Release(); } }
public void ShowBeginInfo(bool isShow, int secondNum = 0, Action action = null) { m_goDragonMatchUIMatchBegin.SetActive(isShow); if (isShow) { if (m_matchLastTimesCountDown != null) m_matchLastTimesCountDown.Release(); m_matchLastTimesCountDown = new MogoCountDown(m_lblDragonMatchUIBeginTimeNum, secondNum, "", "", "", MogoCountDown.TimeStringType.UpToHour, () => { if (action != null) action(); }); } else { if (m_matchLastTimesCountDown != null) m_matchLastTimesCountDown.Release(); } }
public void BeginCountDown1(bool isShow, MogoCountDownTarget type = MogoCountDownTarget.None, int theHour = 0, int theMinutes = 0, int theSecond = 0) { if (isShow) { switch (type) { case MogoCountDownTarget.ClimbTower: m_goTheCountDown1.transform.localPosition = m_CDPosClimbTower; m_goTheCountDown1.SetActive(true); if (m_theCountDown1 != null) m_theCountDown1.Release(); m_theCountDown1 = new MogoCountDown(m_lblTheCountDown1Num, theHour, theMinutes, theSecond, "", "", "", MogoCountDown.TimeStringType.UpToHour, () => { }); break; case MogoCountDownTarget.OgreMustDie: m_goTheCountDown2.transform.localPosition = m_CDPosClimbTower; m_goTheCountDown2.SetActive(true); if (m_theCountDown2 != null) m_theCountDown2.Release(); m_theCountDown2 = new MogoCountDown(m_lblTheCountDown2Num, theHour, theMinutes, theSecond, "", "", "", MogoCountDown.TimeStringType.UpToHour, () => { }); break; } } else { m_goTheCountDown1.SetActive(false); if (m_theCountDown1 != null) m_theCountDown1.Release(); m_goTheCountDown2.SetActive(false); if (m_theCountDown2 != null) m_theCountDown2.Release(); } }
public void BeginCountDown1(bool isShow, int secondsNum) { if (isShow) { if (m_occupyTowerCountDown != null) m_occupyTowerCountDown.Release(); m_occupyTowerCountDown = new MogoCountDown(m_lblOccupyTowerNoticeCountDownNum, secondsNum, "", "", "", MogoCountDown.TimeStringType.UpToMinutes, () => { }); } else { if (m_occupyTowerCountDown != null) m_occupyTowerCountDown.Release(); } }
public void BeginCountDown(string countingStr, string endStr, int theHour, int theMinutes, int timesLeft, Action action = null) { ReleaseCountDown(); if (theHour != 0 || theMinutes != 0) challengeMessage.color = SystemUIColorManager.RED; countDown = new MogoCountDown(challengeMessage, theHour, theMinutes, 0, countingStr, "", endStr, MogoCountDown.TimeStringType.UpToHour, () => { challengeMessage.color = SystemUIColorManager.BROWN; if (action != null) action(); }); }
public void SetNormalMainUIVIPBuffLastTime(UInt32 time, int vipLevel) { if (time > 0) { if (m_NormalMainUIVIPBuffCountDown != null) m_NormalMainUIVIPBuffCountDown.Release(); string frontText = string.Format(LanguageData.GetContent(46853), vipLevel); m_NormalMainUIVIPBuffCountDown = new MogoCountDown(m_lblNormalMainUIVIPBuffBtnText, (int)(time / 1000), frontText, "", "", MogoCountDown.TimeStringType.UpToDayHour, () => { LoggerHelper.Debug("VIPBuff CD is zero"); ShowVIPBuffBtn(false); }); } }
/// <summary> /// 设置VIPBuff剩余时间 /// </summary> /// <param name="time"></param> public void SetVIPBuffLastTime(UInt32 time) { if (time > 0) { if (m_VIPBuffCountDown != null) m_VIPBuffCountDown.Release(); m_VIPBuffCountDown = new MogoCountDown(m_lblNormalMainUIVIPBuffInfoLastTime, (int)(time / 1000), "", "", "", MogoCountDown.TimeStringType.UpToDayHour, () => { ShowVIPBuffBtn(false); }); } }