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