mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 10:24:42 -05:00
-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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user