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);
 }
Beispiel #2
0
 public float GetAllowedMoveInto(Transform wantsToMove, float collideDistance, Direction4 direction, Vector2 hitPoint)
 {
     return(PlatformCollidableHelpers.GetGridAllowedMovementInto(wantsToMove, collideDistance, direction, hitPoint));
 }
Beispiel #3
0
 public override float GetAllowedMoveInto(PhysicsMove move) =>
 PlatformCollidableHelpers.GetGridAllowedMovementInto(move, effector);
Beispiel #4
0
 public float GetAllowedMoveInto(Transform wantsToMove, float collideDistance, Direction4 direction, Vector2 hitPoint) =>
 PlatformCollidableHelpers.GetEdgeColliderAllowedMovementInto(wantsToMove, collideDistance, direction);