public override float GetAllowedMoveInto(PhysicsMove move)
 {
     if (allowedMove != Vector2.zero && allowedMove[move.dir.Axis] != 0)
     {
         float allowedDistance = Mathf.Abs(allowedMove[move.dir.Axis]);
         return(Mathf.Min(move.collideDistance, allowedDistance));
     }
     if (isPlatform)
     {
         return(PlatformCollidableHelpers.GetEdgeColliderAllowedMovementInto(move));
     }
     return(0);
 }
예제 #2
0
 public float GetAllowedMoveInto(Transform wantsToMove, float collideDistance, Direction4 direction, Vector2 hitPoint) =>
 PlatformCollidableHelpers.GetEdgeColliderAllowedMovementInto(wantsToMove, collideDistance, direction);