small adjustment to nitro and player prefabs

This commit is contained in:
Melbyj1125
2022-01-28 13:45:38 -06:00
parent 6bab1292f6
commit 9c3462521e
10 changed files with 38 additions and 23 deletions

View File

@@ -7,6 +7,7 @@ public class dNitro : MonoBehaviour
private PlayerStats playerStats;
private CoolDown driver;
private bool isOnCoolDown = false;
private bool isNitroing = false;
//this will need to be set from scritable object or something;
private float coolDown;
@@ -22,7 +23,13 @@ public class dNitro : MonoBehaviour
//once cooldowns are implemented, put this on one (a long one)
if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false && playerStats.HasNitro)
{
playerStats.CurVel = playerStats.MaxVel;
if(playerStats.CurVel < playerStats.HardCapMaxVel){
playerStats.CurVel += playerStats.Acc * 10;
}
else if(playerStats.CurVel > playerStats.HardCapMaxVel){
playerStats.CurVel = playerStats.HardCapMaxVel;
}
StartCoroutine(startCoolDown());
}
}

View File

@@ -18,7 +18,7 @@ public class dWallRun : NetworkBehaviour
public float wallBouncing = 3;
public float cameraTransitionDuration = 1;
public float wallGravityDownForce = 5f;
public float wallGravityDownForce = 2.8f;
[Space]
dPlayerMovement playerMovementController;