playMeleeSound() 공개 정적인 메소드

public static playMeleeSound ( ) : void
리턴 void
예제 #1
0
    void Update()
    {
        // Regenerate the energy/mana bar after a specified amount of time
        if (Time.time > nextTime)
        {
            nextTime = Time.time + 1f;
            if (cooldown != 100f)
            {
                cooldown += regen;
            }
            UpdateCoolDownSlider();
        }

        // Perform a basic melee attack
        if (Input.GetKeyDown(KeyCode.J) && Time.time > nextMelee)
        {
            // Playsound, animate and attack
            PlayerSfxScript.playMeleeSound();
            anim.SetTrigger("Melee");
            // Pauses to sync up more with the animation
            Invoke("AttactInstantiate", 0.15f);
            nextMelee = Time.time + meleeRate;
        }
    }