audio on jumps

This commit is contained in:
Vladdie
2022-05-01 02:58:44 -05:00
parent e672bbd20d
commit a4cf3b3623
5 changed files with 11848 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ using UnityEngine;
public class AerialJumpingState : AerialBaseState
{
private int previousJumpNum;
public override void EnterState(AerialStateManager aSM, AerialBaseState previousState){

View File

@@ -115,6 +115,15 @@ public class AerialStateManager : NetworkBehaviour
public float currentForcePower = 0;
////
///Audio
public AudioSource jumpSound1;
public AudioSource jumpSound2;
public AudioSource jumpSound3;
public AudioSource springJumpSound;
public AudioSource landingSound;
public AudioSource grappleSound;
////
void Awake(){
////Initialize Player Components
@@ -386,12 +395,28 @@ public class AerialStateManager : NetworkBehaviour
AddImpact((GetWallJumpDirection()), pStats.JumpPow * 8.5f);
pStats.GravVel = pStats.JumpPow;
curJumpNum = 0;
jumpSound1.Play();
}
else{
pStats.GravVel = pStats.JumpPow;
}
//add check here for spring?
if (curJumpNum == 0)
{
jumpSound1.Play();
}
if (curJumpNum == 1)
{
jumpSound2.Play();
}
if (curJumpNum == 2)
{
jumpSound3.Play();
}
curJumpNum++;
jumpPressed = true;
jumpHeld = true;