Skip to content

Commit

Permalink
Update Rolling.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepYhangCN committed Dec 27, 2024
1 parent 116fef0 commit 69e0abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UI/Rolling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public override async void _Process(double delta)
{
if (i is ItemRoll ii)
{
if (nearest == null || Math.Abs(ii.GlobalPosition.X - 640) < Math.Abs(nearest.GlobalPosition.X - 640))
if (nearest == null || Math.Abs(ii.GlobalPosition.X - 800) < Math.Abs(nearest.GlobalPosition.X - 800))
{
nearest = ii;
}
else if (Math.Abs(ii.GlobalPosition.X - 640) == Math.Abs(nearest.GlobalPosition.X - 640))
else if (Math.Abs(ii.GlobalPosition.X - 800) == Math.Abs(nearest.GlobalPosition.X - 800))
{
nearest = new Random().FiftyFifty(nearest,ii);
}
Expand Down

0 comments on commit 69e0abd

Please sign in to comment.