mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-25 11:54:33 -05:00
Merge branch 'main' of https://github.com/Lautha1/TheKingsRace
Merging in Audio?
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ public class AerialStateManager : NetworkBehaviour
|
||||
////Grapple Functions
|
||||
public bool CheckGrapple(){
|
||||
if(!pStats.IsPaused){
|
||||
if ((Input.GetKeyDown(GameManager.GM.bindableActions["grappleKey"]) || Input.GetKeyDown(KeyCode.JoystickButton2)) && pStats.HasGrapple) //If grapple button is hit
|
||||
if ((Input.GetKeyDown(GameManager.GM.bindableActions["grappleKey"]) || 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
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DashNoneState : DashBaseState
|
||||
}
|
||||
|
||||
//if R key then Dashing
|
||||
else if ((Input.GetKeyDown(GameManager.GM.bindableActions["dashKey"]) || Input.GetAxis("Dash") != 0) && !dSM.pStats.IsPaused){
|
||||
else if ((Input.GetKeyDown(GameManager.GM.bindableActions["dashKey"]) || Input.GetKeyDown(KeyCode.JoystickButton5) && !dSM.pStats.IsPaused)){
|
||||
dSM.SwitchState(dSM.DashingState);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class NitroNoneState : NitroBaseState
|
||||
}
|
||||
|
||||
//if pressing left shift then nitroing
|
||||
else if ((Input.GetKeyDown(GameManager.GM.bindableActions["nitroKey"]) || Input.GetKeyDown(KeyCode.JoystickButton8)) && !nSM.pStats.IsPaused)
|
||||
else if ((Input.GetKeyDown(GameManager.GM.bindableActions["nitroKey"]) || Input.GetKeyDown(KeyCode.JoystickButton4)) && !nSM.pStats.IsPaused)
|
||||
{
|
||||
nSM.SwitchState(nSM.NitroingState);
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ public class OffenseNoneState : OffenseBaseState
|
||||
}
|
||||
|
||||
//if grounded then grounded kick states
|
||||
else if(oSM.aSM.currentState == oSM.aSM.GroundedState && (Input.GetKeyDown(GameManager.GM.bindableActions["kickKey"]) || Input.GetAxis("Kick") != 0) && !oSM.pStats.IsPaused){
|
||||
else if(oSM.aSM.currentState == oSM.aSM.GroundedState && (Input.GetKeyDown(GameManager.GM.bindableActions["kickKey"]) || Input.GetKeyDown(KeyCode.JoystickButton2)) && !oSM.pStats.IsPaused){
|
||||
//Regular 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)){
|
||||
oSM.SwitchState(oSM.AirKickState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,12 +32,6 @@ public class ControlsMenuScript : MonoBehaviour
|
||||
keyboardKingControlsMenu.SetActive(false);
|
||||
gamePadKingControlsMenu.SetActive(true);
|
||||
}
|
||||
//if off, turn it on
|
||||
if(gamePadKingControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardKingControlsMenu.SetActive(false);
|
||||
gamePadKingControlsMenu.SetActive(true);
|
||||
}
|
||||
}
|
||||
else{
|
||||
//if off, turn it on
|
||||
@@ -46,12 +40,6 @@ public class ControlsMenuScript : MonoBehaviour
|
||||
keyboardRunnerControlsMenu.SetActive(false);
|
||||
gamePadRunnerControlsMenu.SetActive(true);
|
||||
}
|
||||
//if off, turn it on
|
||||
if(gamePadRunnerControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardRunnerControlsMenu.SetActive(false);
|
||||
gamePadRunnerControlsMenu.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,14 +47,8 @@ public class ControlsMenuScript : MonoBehaviour
|
||||
if (Input.GetAxis("Mouse X") != 0 || Input.GetAxis("Mouse Y") != 0)
|
||||
{
|
||||
if(isKing){
|
||||
//if off, turn it on
|
||||
if(gamePadKingControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardKingControlsMenu.SetActive(true);
|
||||
gamePadKingControlsMenu.SetActive(false);
|
||||
}
|
||||
//if off, turn it on
|
||||
if(gamePadKingControlsMenu.activeInHierarchy == false)
|
||||
if(keyboardKingControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardKingControlsMenu.SetActive(true);
|
||||
gamePadKingControlsMenu.SetActive(false);
|
||||
@@ -74,17 +56,11 @@ public class ControlsMenuScript : MonoBehaviour
|
||||
}
|
||||
else{
|
||||
//if off, turn it on
|
||||
if(gamePadRunnerControlsMenu.activeInHierarchy == false)
|
||||
if(keyboardRunnerControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardRunnerControlsMenu.SetActive(true);
|
||||
gamePadRunnerControlsMenu.SetActive(false);
|
||||
}
|
||||
//if off, turn it on
|
||||
if(gamePadRunnerControlsMenu.activeInHierarchy == false)
|
||||
{
|
||||
keyboardRunnerControlsMenu.SetActive(true);
|
||||
gamePadRunnerControlsMenu.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user