Debug Scripts have been cleaned up.

I won't apply this cleanup to the networked version yet because they
will be updated to a state machine anyways.
This commit is contained in:
Melbyj1125
2022-02-10 21:37:19 -06:00
parent 8fbedf486d
commit 6f0b3a0d0b
25 changed files with 467 additions and 260 deletions

View File

@@ -45,14 +45,12 @@ public class dWallRun : NetworkBehaviour
return !isPlayergrounded() && verticalAxis > 0 && VerticalCheck();
}
bool VerticalCheck()
{
bool VerticalCheck(){
return !Physics.Raycast(transform.position, Vector3.down, minimumHeight);
}
void Start()
{
void Start(){
playerMovementController = GetComponent<dPlayerMovement>();
directions = new Vector3[]{
@@ -65,15 +63,14 @@ public class dWallRun : NetworkBehaviour
}
public void WallRunRoutine()
{
public void WallRunRoutine(){
//if (!IsLocalPlayer) { return; }
isWallRunning = false;
hits = new RaycastHit[directions.Length];
if(playerMovementController.GetJumpPressed())
if(playerMovementController.jumpHeld)
{
jumping = true;
}
@@ -173,7 +170,7 @@ public class dWallRun : NetworkBehaviour
moveToSet.y = 0;
//
playerMovementController.SetPlayerVelocity(moveToSet);
playerMovementController.vel = moveToSet;
if(!isWallRunning){
firstAttach = true;
isWallRunning = true;