Exemplo n.º 1
0
    void Update()
    {
        //——————————游戏流程控制——————————

        //无操作时间累加
        time_no_operation += Time.deltaTime;

        ////10秒没有操作
        //if (time_no_operation >= 10)
        //{
        //    anim_player_anim_controller.runtimeAnimatorController = anim_anim_player[1];
        //    anim_player.SetActive(true);
        //}

        //这里是一回合结束
        if (count_for_round == 4)
        {
            DbControllerScript.topic = topic_level_1[round - 1];
            DbControllerScript.time  = timerScript.timeCount - time_for_group;
            DbControllerScript.point = 2 - operation / 2;
            DbControllerScript.Db_write();

            if (round < 5)
            {
                round++;
            }
            operation = 0;
            DbControllerScript.round = round;

            count_for_round = 0;

            time_for_group = timerScript.timeCount;

            //scoreBarScript.BarUpdate();
            //scoreBarScript.StarUpdate();
            //scoreBarScript.YanwenzijunUpdate();

            //如果本关还没结束,进入下一轮
            if (count < 20)
            {
                //anim_player.SetActive(true);

                Invoke("enter_next_group", 1f);
            }
        }

        //5组素材,则本关结束
        if (count == 20)
        {
            timerScript.timeEnable = false;
            musicControllerScript.playSound1(1);
            musicControllerScript.playSpeak(2);
            dialog_1.SetActive(true);
            count++;
        }
    }