mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复新玩家无法游玩的错误 & 滚回启动约束
This commit is contained in:
parent
bd94670420
commit
5462c2d298
@ -19,9 +19,9 @@ namespace VPet_Simulator.Windows.Interface
|
||||
/// <summary>
|
||||
/// 新存档
|
||||
/// </summary>
|
||||
public GameSave_v2()
|
||||
public GameSave_v2(string petname)
|
||||
{
|
||||
GameSave = new GameSave();
|
||||
GameSave = new GameSave(petname);
|
||||
Statistics = new Statistics();
|
||||
}
|
||||
protected void load(ILPS lps, Statistics oldStatistics = null, GameSave oldGameSave = null, ILPS olddata = null)
|
||||
|
@ -49,7 +49,7 @@ namespace VPet_Simulator.Windows
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
public int version { get; } = 106;
|
||||
public int version { get; } = 107;
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
|
@ -118,13 +118,13 @@ namespace VPet_Simulator.Windows
|
||||
L = point.X; T = point.Y;
|
||||
}
|
||||
|
||||
// control position inside bounds
|
||||
Core.Controller = new MWController(this);
|
||||
double dist;
|
||||
if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) L -= dist;
|
||||
if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) L += dist;
|
||||
if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) T -= dist;
|
||||
if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) T += dist;
|
||||
//// control position inside bounds
|
||||
//Core.Controller = new MWController(this);
|
||||
//double dist;
|
||||
//if ((dist = Core.Controller.GetWindowsDistanceLeft()) < 0) L -= dist;
|
||||
//if ((dist = Core.Controller.GetWindowsDistanceRight()) < 0) L += dist;
|
||||
//if ((dist = Core.Controller.GetWindowsDistanceUp()) < 0) T -= dist;
|
||||
//if ((dist = Core.Controller.GetWindowsDistanceDown()) < 0) T += dist;
|
||||
|
||||
Left = L;
|
||||
Top = T;
|
||||
@ -281,7 +281,8 @@ namespace VPet_Simulator.Windows
|
||||
}
|
||||
}
|
||||
}
|
||||
Core.Save = new GameSave(petname.Translate());
|
||||
GameSavesData = new GameSave_v2(petname.Translate());
|
||||
Core.Save = GameSavesData.GameSave;
|
||||
}
|
||||
public async void GameLoad()
|
||||
{
|
||||
|
@ -1286,7 +1286,8 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
if (MessageBoxX.Show("是否重置游戏数据重新开始?\n该操作无法撤回".Translate(), "重新开始".Translate(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
mw.Core.Save = new GameSave(mw.Core.Save.Name);
|
||||
mw.GameSavesData = new GameSave_v2(mw.Core.Save.Name);
|
||||
mw.Core.Save = mw.GameSavesData.GameSave;
|
||||
if (!mw.HashCheck)
|
||||
mw.GameSavesData.Statistics = new Statistics();
|
||||
mw.HashCheck = true;
|
||||
|
Loading…
Reference in New Issue
Block a user