Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (currentState == State.InGame1 || currentState == State.Click1)
        {
            if (demframe < 30)
            {
                demframe++;
            }
            else
            {
                mTime--;

                txtTime.text = ClsThaoTac.CoverTimeToString(mTime);
                //if (mTime <= 10)
                //{
                //    txtTime.color = new Color(1, 0, 1, 1);
                //}

                demframe = 0;
                if (mTime <= 0)
                {
                    BangSoSanh.gameObject.SetActive(false);
                    BangSoSanh.RecycleSp();
                    GameOver();
                }
            }
        }
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        if (currentState != State.Start && currentState != State.Stop)
        {
            //đếm ngược thời gian từ 20 phút
            if (demframe < 30)
            {
                demframe++;
            }
            else
            {
                mTime--;
                txtTime.text = ClsThaoTac.CoverTimeToString(mTime);
                //if (mTime <= 10)
                //{
                //    txtTime.color = new Color(1, 0, 1, 1);
                //}

                demframe = 0;
                if (mTime <= 0)
                {
                    //currentState = State.Stop;
                    //hết giờ thì game over
                    doHideShow(true);
                    resetColorBt();
                    gameOver();
                }
            }
        }
    }
Esempio n. 3
0
    // Update is called once per frame
    void Update()
    {
        if (currentState == State.InGame1 || currentState == State.Click1)
        {
            //đếm ngược thời gian từ 20 phút
            if (demframe < 30)
            {
                demframe++;
            }
            else
            {
                mTime--;
                txtTime.text = ClsThaoTac.CoverTimeToString(mTime);
                //if (mTime <= 10)
                //{
                //    txtTime.color = new Color(1, 0, 1, 1);
                //}

                demframe = 0;
                if (mTime <= 0)
                {
                    //hết giờ thì game over
                    GameOver();
                }
            }
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (currentState == State.InGame1 || currentState == State.Click1 || currentState == State.Click2)
        {
            if (demframe < 30)
            {
                demframe++;
            }
            else
            {
                mTime--;
                txtTime.text = ClsThaoTac.CoverTimeToString(mTime);
                //if (mTime <= 10)
                //{
                //    txtTime.color = new Color(1, 0, 1, 1);
                //}

                demframe = 0;
                if (mTime <= 0)
                {
                    GameOver();
                }
            }
        }
    }
Esempio n. 5
0
 void gameOver()
 {
     currentState = State.Stop;
     if (diemSo < 0)
     {
         diemSo = 0;
     }
     GameController.instance.sumCoin += diemSo;
     GameController.instance.sumTime += mTime;
     PopUpController.instance.ShowStopDinhNui(diemSo, ClsThaoTac.CoverTimeToString(1200 - mTime));
     PopUpController.instance.HideQuestionDinhNui();
     resetThongSo();
 }
 void gameOver()
 {
     currentState = State.Stop;
     if (diemSo < 0)
     {
         diemSo = 0;
     }
     VioGameController.instance.sumCoin += diemSo;
     VioGameController.instance.sumTime += mTime;
     VioPopUpController.instance.ShowStopThongThai(diemSo, ClsThaoTac.CoverTimeToString(1200 - mTime));
     VioPopUpController.instance.HideQuestionMonkey();
     resetDefault();
 }
Esempio n. 7
0
 void GameOver()
 {
     currentState = State.Start;
     PopUpController.instance.HideQuestionSapXep();
     if (mDiemB1 < 0)
     {
         mDiemB1 = 0;
     }
     GameController.instance.sumCoin += mDiemB1;
     GameController.instance.sumTime += mTime;
     PopUpController.instance.ShowStopSapXep(mDiemB1, ClsThaoTac.CoverTimeToString(1200 - mTime));
     resetTL();
 }