コード例 #1
0
 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);