Exemplo n.º 1
0
 public SelfContestRule()
 {
     playernumber = llrplayerNumberList[0];
     precontest   = llrprecontestList[0];
     finalcontest = llrprecontestList[0];
     cost         = costList[0];
     timeseconds  = (uint)GameCommon.ConvertDataTimeToLong(System.DateTime.Now.Date) + 3600;
 }
Exemplo n.º 2
0
    void RefreshContestTimeTipsText(Text texttips)
    {
        long timeseconds = GameCommon.ConvertDataTimeToLong(System.DateTime.Now);

        if (scr_.timeseconds <= timeseconds)
        {
            scr_.timeseconds = (uint)GameCommon.ConvertDataTimeToLong(System.DateTime.Now.AddDays(1).Date.AddSeconds(hourcall_ * 3600 + minutecall_ * 60));
            texttips.text    = string.Format("比赛开始时间为明天的{0:00}时{1:00}分", hourcall_, minutecall_);
        }
        else
        {
            texttips.text = string.Format("比赛开始时间为今天的{0:00}时{1:00}分", hourcall_, minutecall_);
        }
    }
Exemplo n.º 3
0
    void RefreshContestTime(Transform rulePanelTransform, int HourValue = -1, int MinuteValue = -1)
    {
        if (HourValue >= 0 && MinuteValue >= 0)
        {
            hourcall_   = (uint)HourValue;
            minutecall_ = (uint)MinuteValue;
        }
        else
        {
            hourcall_   = (uint)System.DateTime.Now.Hour;
            minutecall_ = (uint)System.DateTime.Now.Minute + 3;
            if (minutecall_ >= 60)
            {
                hourcall_   += 1;
                minutecall_ -= 60;
            }
        }

        scr_.timeseconds = (uint)GameCommon.ConvertDataTimeToLong(System.DateTime.Now.Date.AddSeconds(hourcall_ * 3600 + minutecall_ * 60));

        Transform ChildTransform = null;
        Transform right          = rulePanelTransform.Find("Right");

        for (int index = 0; index < right.childCount; ++index)
        {
            ChildTransform = right.GetChild(index);
            if (!ChildTransform.gameObject.activeSelf)
            {
                continue;
            }
            ChildTransform = ChildTransform.Find("shijian");
            if (ChildTransform == null)
            {
                continue;
            }
            Text texttips = ChildTransform.Find("Text_tips").GetComponent <Text>();
            RefreshContestTimeTipsText(texttips);
            Text hourtx = ChildTransform.Find("Dropdown_h/Label").GetComponent <Text>();
            hourtx.text = string.Format("{0:00}", hourcall_);
            Text minutetx = ChildTransform.Find("Dropdown_m/Label").GetComponent <Text>();
            minutetx.text = string.Format("{0:00}", minutecall_);
        }
    }