示例#1
0
    void UpdateDashInput()
    {
        if (!alice.isDashing && !alice.isSlashing && Input.GetButtonDown("LB") && Mathf.Abs(rb.velocity.magnitude) >= 0.1f &&
            REMAINING_DASHES > 0)
        {
            alice.isDashing = true;
            if (dash_audio_prefab != null)
            {
                Instantiate(dash_audio_prefab);
            }

            REMAINING_DASHES--;

            DASH_UI.Refresh(REMAINING_DASHES);
        }
    }
示例#2
0
    void updateCooldown()
    {
        if (REMAINING_DASHES < DASH_COUNT)
        {
            cooldown_timer += Time.deltaTime;
        }
        if (cooldown_timer >= DASH_COOLDOWN && REMAINING_DASHES < DASH_COUNT)
        {
            REMAINING_DASHES++;
            DASH_UI.Refresh(REMAINING_DASHES);

            cooldown_timer = 0;
        }
        DASH_COUNT = 1 + current_mode / 7;
        if (REMAINING_DASHES > DASH_COUNT)
        {
            REMAINING_DASHES = DASH_COUNT;
            DASH_UI.Refresh(REMAINING_DASHES);
        }
    }