Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        time        += Time.deltaTime;
        commandTime -= Time.deltaTime;
        if (commandTime < 0f && commandTimeText.enabled)
        {
            commandTimeText.enabled = false;
            timeButton.StartTime();
            audioSource.pitch  = 1f;
            audioSource.volume = 1f;


            FindObjectOfType <ActionCamera>().ActionCameraOn();
            actionTime = actionTimeLength;
        }

        actionTime -= Time.deltaTime;

        if (actionTime < 0f)
        {
            FindObjectOfType <ActionCamera>().ActionCameraOff();
        }
        else
        {
            actionGauge.value += baseActionPoint * Time.deltaTime;
            AddScore((int)(baseActionPoint * Time.deltaTime * 1000f));
        }

        if (score != displayScore)
        {
            displayScore         += score / (displayScore + 1);
            displayScoreText.text = "Just Now Action Score:" + displayScore * 10;
        }
        else
        {
            totalScore         += score * 10;
            totalScoreText.text = "Total Score:" + totalScore.ToString();
            score = displayScore = 0;
            displayScoreText.text = "Just Now Action Score:" + 0;
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        time        += Time.deltaTime;
        commandTime -= Time.deltaTime;
        if (commandTime < 0f && commandTimeText.enabled)
        {
            commandTimeText.enabled = false;
            timeButton.StartTime();

            FindObjectOfType <ActionCamera>().ActionCameraOn();
            actionTime = actionTimeLength;
        }

        actionTime -= Time.deltaTime;

        if (actionTime < 0f)
        {
            FindObjectOfType <ActionCamera>().ActionCameraOff();
        }
        else
        {
            actionGauge.value += baseActionPoint * Time.deltaTime;
        }
    }