-Modified mountain (may need more changes later)

-Added full controller support for all abillities that will be in the game
(grapple is currently set to x)
This commit is contained in:
Evan Nydahl
2021-12-01 15:38:24 -06:00
parent 02410a642f
commit 20db245902
20 changed files with 434 additions and 606 deletions

View File

@@ -30,7 +30,8 @@ public class dKickController : NetworkBehaviour
void Kick(){
//Note: when we merge this into PlayerMovement, we may want to change isgrounded to our
//custom is grounded
if (Input.GetKeyDown(KeyCode.F) && isKicking == false && characterController.isGrounded == false)
//If F is pressed or gamepad right trigger is pulled
if ((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false && characterController.isGrounded == false)
{
Debug.Log("dive");
// if kicking in air, kick until grounded (maybe add some foward momentum if needeD)
@@ -39,13 +40,14 @@ public class dKickController : NetworkBehaviour
leg.SetActive(true);
}
//otherwise do ground kick for .3 seconds
else if (Input.GetKeyDown(KeyCode.F) && isKicking == false){
else if ((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false){
Debug.Log("kick");
StartCoroutine(Kicking(.3f));
}
//once dive kick touches ground, set back to normal state
if(characterController.isGrounded == true && isDiveKicking == true){
if (characterController.isGrounded == true && isDiveKicking == true)
{
isDiveKicking = false;
isKicking = false;
leg.SetActive(false);