King Movement

>King Movement, both Horizontal and and Circular implemented
>King Abilites changed to work with Player's getHit function
This commit is contained in:
Katherine
2021-12-01 12:43:45 -06:00
parent 64aafcb80e
commit 27d3d5f4ab
23 changed files with 162 additions and 345 deletions

View File

@@ -386,7 +386,7 @@ public class dPlayerMovement : NetworkBehaviour
}
//Ragdoll Functions
private void getHit(Vector3 dir, float force){
public void getHit(Vector3 dir, float force){
if(firstHit == false){
EnableRagdoll();
dir.Normalize();

View File

@@ -18,19 +18,19 @@ public class Nitro : MonoBehaviour
driver = FindObjectOfType<CoolDown>();
}
// Update is called once per frame
void Update(){
//once cooldowns are implemented, put this on one (a long one)
if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false){
playerStats.CurVel = playerStats.MaxVel;
StartCoroutine(startCoolDown());
}
}
private IEnumerator startCoolDown(){
Debug.Log("start corotine");
isOnCoolDown = true;
driver.startUICooldown("Nitro");
yield return new WaitForSeconds(coolDown);
isOnCoolDown = false;
}
//// Update is called once per frame
//void Update(){
// //once cooldowns are implemented, put this on one (a long one)
// if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false){
// playerStats.CurVel = playerStats.MaxVel;
// StartCoroutine(startCoolDown());
// }
//}
//private IEnumerator startCoolDown(){
// Debug.Log("start corotine");
// isOnCoolDown = true;
// driver.startUICooldown("Nitro");
// yield return new WaitForSeconds(coolDown);
// isOnCoolDown = false;
//}
}

View File

@@ -370,7 +370,7 @@ public class PlayerMovement : NetworkBehaviour
}
//Ragdoll Functions
private void getHit(Vector3 dir, float force){
public void getHit(Vector3 dir, float force){
if(firstHit == false){
EnableRagdoll();
dir.Normalize();