removed commented out code and print statements
the console should finally be message free! except for the unity memory leak lol but that one's not on us
This commit is contained in:
@@ -125,7 +125,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
isRegFalling = false;
|
||||
}
|
||||
else {
|
||||
// print("not jumping");
|
||||
if (!_isJumpFalling && !isRegFalling) {
|
||||
if (unlockedTrumpet) {
|
||||
trumpet = 1;
|
||||
@@ -143,7 +142,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
#region JUMP CHECKS
|
||||
if (IsJumping && RB.velocity.y <= 0) {
|
||||
IsJumping = false;
|
||||
// print("isJumping " + IsJumping);
|
||||
_isJumpFalling = true;
|
||||
}
|
||||
|
||||
@@ -162,7 +160,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
_isJumpFalling = false;
|
||||
|
||||
bool inCoyoteTime = LastOnGroundTime > 0;
|
||||
//print("coyote time: " + inCoyoteTime);
|
||||
|
||||
Jump();
|
||||
|
||||
@@ -186,7 +183,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
// stop sound if needed
|
||||
if (soundPlaying && (isRegFalling || IsJumping || _isJumpFalling)) {
|
||||
print("footsteps stop");
|
||||
audioSource.Stop();
|
||||
soundPlaying = false;
|
||||
}
|
||||
@@ -201,10 +197,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
#region GRAVITY
|
||||
//Higher gravity if we've released the jump input or are falling
|
||||
// if (IsSliding)
|
||||
// {
|
||||
// SetGravityScale(0);
|
||||
// }
|
||||
if (RB.velocity.y < 0 && _moveInput.y < 0) {
|
||||
//Much higher gravity if holding down
|
||||
SetGravityScale(Data.gravityScale * Data.fastFallGravityMult);
|
||||
@@ -234,13 +226,11 @@ public class PlayerMovement : MonoBehaviour
|
||||
#region SOUND CHECKS
|
||||
if (!IsJumping && !_isJumpFalling && !isRegFalling && _moveInput.x != 0) {
|
||||
if (!soundPlaying) {
|
||||
// print("footsteps PLAY");
|
||||
audioSource.Play();
|
||||
soundPlaying = true;
|
||||
}
|
||||
}
|
||||
else if (soundPlaying && audioSource.clip.name == "footsteps") {
|
||||
// print("footsteps stop");
|
||||
audioSource.Stop();
|
||||
soundPlaying = false;
|
||||
}
|
||||
@@ -375,7 +365,6 @@ public class PlayerMovement : MonoBehaviour
|
||||
}
|
||||
|
||||
public bool IsGrounded() {
|
||||
// print(Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
|
||||
return (Physics2D.OverlapBox(new Vector2(this.transform.position.x, this.transform.position.y - _groundCheckOffset), _groundCheckSize, 0, _groundLayer) && !IsJumping);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user