Made mouse follow player sprite
This commit is contained in:
@@ -121,6 +121,8 @@ namespace stardew_access
|
||||
|
||||
MenuPatch.resetGlobalVars();
|
||||
|
||||
SnapMouseToPlayer();
|
||||
|
||||
if(!isReadingTile && readTile)
|
||||
ReadTile();
|
||||
}
|
||||
@@ -156,6 +158,14 @@ namespace stardew_access
|
||||
}
|
||||
}
|
||||
|
||||
private void SnapMouseToPlayer()
|
||||
{
|
||||
int x = Game1.player.GetBoundingBox().Center.X - Game1.viewport.X;
|
||||
int y = Game1.player.GetBoundingBox().Center.Y - Game1.viewport.Y;
|
||||
|
||||
Game1.setMousePosition(x, y);
|
||||
}
|
||||
|
||||
private static async void ReadTile()
|
||||
{
|
||||
isReadingTile = true;
|
||||
|
Reference in New Issue
Block a user