提起时小于1的位移忽略掉避免抖动

This commit is contained in:
ZouJin 2024-04-19 17:49:38 +08:00
parent d5aed878af
commit d38dd1a58e
2 changed files with 5 additions and 1 deletions

View File

@ -358,6 +358,10 @@ namespace VPet_Simulator.Core
var mp = e.GetPosition(MainGrid);
var x = mp.X - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].X;
var y = mp.Y - Core.Graph.GraphConfig.RaisePoint[(int)Core.Save.Mode].Y;
if (Math.Abs(x) < 1)
x = 0;
if (Math.Abs(y) < 1)
y = 0;
Core.Controller.MoveWindows(x, y);
if (Math.Abs(x) + Math.Abs(y) > 20 && rasetype >= 1)
rasetype = 0;

View File

@ -19,7 +19,7 @@ public partial class MainWindow
/// <summary>
/// 版本号
/// </summary>
public int version { get; } = 11012;
public int version { get; } = 11013;
/// <summary>
/// 版本号
/// </summary>