コード例 #1
0
    public void letTime()
    {
        long leftTime = myTimeRecord.GetLeftTime();

        if (leftTime != lastLeftTime)
        {
            lastLeftTime = leftTime;
            long leftHour = leftTime / SkyTime.HOUR;
            leftTime -= leftHour * SkyTime.HOUR;
            long leftMinute = leftTime / SkyTime.MINUTE;
            leftTime -= leftMinute * SkyTime.MINUTE;
            long leftSecond = leftTime;
            Debug.Log(leftHour + " : " + leftMinute + " : " + leftSecond);
        }
    }
コード例 #2
0
    public void letTime()
    {
        long leftTime = timeRecord.GetLeftTime();

        if (leftTime > 0)
        {
            if (leftTime != lastLeftTime)
            {
                lastLeftTime = leftTime;
                long leftHour = leftTime / SkyTime.HOUR;
                leftTime -= leftHour * SkyTime.HOUR;
                long leftMinute = leftTime / SkyTime.MINUTE;
                leftTime -= leftMinute * SkyTime.MINUTE;
                long   leftSecond = leftTime;
                string s          = leftHour + " : " + leftMinute + " : " + leftSecond;
                mytext.text = "Special \n" + s;
            }
        }
        else
        {
            mytext.text = "NoSpecial";
        }
    }