swing feels a lot more complete

Takes into accoutn player height and speed
need to adjust slightly for better ingame feel when it is implemented
into the levels.
This commit is contained in:
Melbyj1125
2022-02-01 20:32:55 -06:00
parent b2bd9783d4
commit c5ae603e8f
9 changed files with 91 additions and 28 deletions

View File

@@ -20,7 +20,7 @@ public class Dash : NetworkBehaviour{
PlayerMovement pMove;
void Start(){
driver = GameObject.Find("Canvas").GetComponent<CoolDown>();
//driver = GameObject.Find("Canvas").GetComponent<CoolDown>();
characterController = this.gameObject.GetComponent<CharacterController>();
pMove = GetComponent<PlayerMovement>();
}
@@ -33,7 +33,7 @@ public class Dash : NetworkBehaviour{
void DashPlayer(){
if (!IsLocalPlayer) { return; }
if(characterController.enabled == true){
if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false)
if (Input.GetKeyDown(KeyCode.R) && isOnCoolDown == false)
{
currentDashTime = 0;
StartCoroutine(startCoolDown());

View File

@@ -13,7 +13,7 @@ public class Nitro : MonoBehaviour
// Start is called before the first frame update
void Start()
{
driver = GameObject.Find("Canvas").GetComponent<CoolDown>();
//driver = GameObject.Find("Canvas").GetComponent<CoolDown>();
playerStats = GetComponent<PlayerStats>();
}