mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 18:04:27 -05:00
small changes to player and items for cleanup
This commit is contained in:
@@ -22,21 +22,22 @@ public class dDash : NetworkBehaviour{
|
||||
//UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING
|
||||
void FixedUpdate(){
|
||||
//if (!IsLocalPlayer) { return; }
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
currentDashTime = 0;
|
||||
if(characterController.enabled == true){
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
currentDashTime = 0;
|
||||
}
|
||||
if(currentDashTime < maxDashTime)
|
||||
{
|
||||
moveDirection = transform.forward * dashDistance;
|
||||
currentDashTime += dashStoppingSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
moveDirection = Vector3.zero;
|
||||
}
|
||||
characterController.Move(moveDirection * Time.deltaTime * dashSpeed);
|
||||
}
|
||||
if(currentDashTime < maxDashTime)
|
||||
{
|
||||
moveDirection = transform.forward * dashDistance;
|
||||
currentDashTime += dashStoppingSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
moveDirection = Vector3.zero;
|
||||
}
|
||||
characterController.Move(moveDirection * Time.deltaTime * dashSpeed);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user