mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-25 20:04:39 -05:00
audio on jumps
This commit is contained in:
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class AerialJumpingState : AerialBaseState
|
||||
{
|
||||
|
||||
|
||||
private int previousJumpNum;
|
||||
public override void EnterState(AerialStateManager aSM, AerialBaseState previousState){
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user