void FlipToWall(WallCheckData wall) { if (wall.direction != ForwardScalar()) { ForceFlip(); } }
void OnWallHit(WallCheckData wall) { EndDashCooldown(); InterruptMeteor(); RefreshAirMovement(); if (bufferedJump && unlocks.HasAbility(Ability.WallClimb)) { WallJump(); CancelBufferedJump(); } }
void UpdateWallSliding() { bool touchingLastFrame = wall!=null; wall = wallCheck.GetWall(); if (!touchingLastFrame && (wall!=null)) { OnWallHit(wall); } else if (touchingLastFrame && (wall==null)) { OnWallLeave(); return; } if (wall != null) { FlipToWall(wall); } anim.SetBool("TouchingWall", touchingLastFrame); }