Esempio n. 1
0
    private IEnumerator WalingSoundCorutine(bool running)
    {
        mSoundManager.PlayPlayerSound(running ? PlayerSoundManager.PlayerSoundType.RUN : PlayerSoundManager.PlayerSoundType.WALK,
                                      running ? runningSoundVolume : walkingSoundVolume);

        yield return(new WaitForSeconds(running ? runningSoundInterval : walkingSoundInterval));

        mWalkSoundCorutine = null;
        yield return(null);
    }
Esempio n. 2
0
    private void FixedUpdate()
    {
        rb2d.velocity = movement;

        if (jump)
        {
            soundManager.PlayPlayerSound(jumpSound);
            rb2d.AddForce(Vector2.up * jumpPower, ForceMode2D.Impulse);
            jump = false;
        }
    }
    private void PlayAnimationAndSound()
    {
        //Animation
        mAnimator.SetTrigger(sniffingAnimationTrigger);

        mSoundManager.PlayPlayerSound(PlayerSoundManager.PlayerSoundType.SNIFF, sniffSoundVolume);
    }