Made mouse follow player sprite
parent
2dc1b81480
commit
5fa584a75a
|
@ -121,6 +121,8 @@ namespace stardew_access
|
||||||
|
|
||||||
MenuPatch.resetGlobalVars();
|
MenuPatch.resetGlobalVars();
|
||||||
|
|
||||||
|
SnapMouseToPlayer();
|
||||||
|
|
||||||
if(!isReadingTile && readTile)
|
if(!isReadingTile && readTile)
|
||||||
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()
|
private static async void ReadTile()
|
||||||
{
|
{
|
||||||
isReadingTile = true;
|
isReadingTile = true;
|
||||||
|
|
Loading…
Reference in New Issue