예제 #1
0
    void CountDownTime()
    {
        if (NowLeftTotalSecond == 0)
        {
            CancelInvoke("CountDownTime");
            if (isOffLine)
            {
                GameManageroff.DefineTimeWinLose();
            }
            else
            {
                GameManager.DefineTimeWinLose();
            }

            this.GetComponent <AudioSource>().Play();
        }

        NowLeftTotalSecond -= 1;
        if (isOffLine)
        {
            if (isMode)
            {
                if (MM.FirstChangeTime_Second == NowLeftTotalSecond)
                {
                    MM.FirstChange();
                }
                else if (MM.SecondChangeTime_Second == NowLeftTotalSecond)
                {
                    MM.SecondChange();
                }
            }
            else
            {
                if (CCT.FirstChangeTime_Second == NowLeftTotalSecond)
                {
                    CCT.FirstChange();
                }
                else if (CCT.SecondChangeTime_Second == NowLeftTotalSecond)
                {
                    CCT.SecondChange();
                }
            }
        }
        if (NowLeftTotalSecond <= 0)
        {
            NowLeftMinute = 0;
            NowLeftSecond = 0;
        }
        else
        {
            NowLeftMinute = NowLeftTotalSecond / 60;
            NowLeftSecond = NowLeftTotalSecond % 60;
        }

        CallNetPlayer();
    }