Maze 32x32
This commit is contained in:
@@ -148,8 +148,8 @@ namespace Marro.PacManUdon
|
||||
|
||||
var inputDirection = input.GetDirection();
|
||||
if (!inputDirection.Equals(Direction.Zero) && !inputDirection.Equals(targetDirection) // Ignore neutral input or input in our current direction
|
||||
&& (!IsHorizontal(inputDirection) || (Math.Round(nextPosition.y, 5) - 0.5) % 1 != 0) // Target grid position near the edge of a tile may not be correct, ignore inputs near the border
|
||||
&& (!IsVertical(inputDirection) || (Math.Round(nextPosition.x, 5) - 0.5) % 1 != 0)
|
||||
//&& (!IsHorizontal(inputDirection) || (Math.Round(nextPosition.x, 5) - 0.5) % 1 != 0) // Target grid position near the edge of a tile may not be correct, ignore inputs near the border
|
||||
//&& (!IsVertical(inputDirection) || (Math.Round(nextPosition.y, 5) - 0.5) % 1 != 0)
|
||||
&& !pelletManager.IsWallUpcoming(nextPosition, directionVectors[(int)inputDirection]))
|
||||
{ // Check if the requested direction does not have a wall
|
||||
if (IsHorizontal(inputDirection))
|
||||
|
||||
Reference in New Issue
Block a user