ReAssigned Controller and added colliders for controller in pasue menu

This commit is contained in:
Evan Nydahl
2022-04-27 19:52:01 -05:00
parent 030cd225bf
commit b0fb0f9e09
13 changed files with 454 additions and 70 deletions

View File

@@ -571,7 +571,7 @@ public class dAerialStateManager : NetworkBehaviour
//Checks if the player can grapple
public bool CheckGrapple(){
if(!pStats.IsPaused){
if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.JoystickButton2)) && pStats.HasGrapple) //If grapple button is hit
if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.JoystickButton10)) && pStats.HasGrapple) //If grapple button is hit
{
//Debug.Log("Checking Hooks");
hookPointIndex = FindHookPoint(); //Find the nearest hook point within max distance

View File

@@ -23,7 +23,7 @@ public class dDashNoneState : dDashBaseState
}
//if R key then Dashing
else if ((Input.GetKeyDown(KeyCode.R) || Input.GetAxis("Dash") != 0) && !dSM.pStats.IsPaused){
else if ((Input.GetKeyDown(KeyCode.R) || Input.GetKeyDown(KeyCode.JoystickButton5) && !dSM.pStats.IsPaused)){
dSM.SwitchState(dSM.DashingState);
}

View File

@@ -23,7 +23,7 @@ public class dNitroNoneState : dNitroBaseState
}
//if pressing left shift then nitroing
else if ((Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.JoystickButton8)) && !nSM.pStats.IsPaused)
else if ((Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.JoystickButton4)) && !nSM.pStats.IsPaused)
{
nSM.SwitchState(nSM.NitroingState);
}

View File

@@ -20,13 +20,13 @@ public class dOffenseNoneState : dOffenseBaseState
}
//if grounded then grounded kick states
else if(oSM.aSM.currentState == oSM.aSM.GroundedState && (Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && !oSM.pStats.IsPaused){
else if(oSM.aSM.currentState == oSM.aSM.GroundedState && (Input.GetKeyDown(KeyCode.F) || Input.GetKeyDown(KeyCode.JoystickButton2)) && !oSM.pStats.IsPaused){
// kick
oSM.SwitchState(oSM.KickState);
}
//if in the air
else if((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && !oSM.pStats.IsPaused){
else if((Input.GetKeyDown(KeyCode.F) || Input.GetKeyDown(KeyCode.JoystickButton2)) && !oSM.pStats.IsPaused){
//air kick
oSM.SwitchState(oSM.AirKickState);
}