Skip to content

Commit

Permalink
不启用功能的时候不计算切换动画
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed May 8, 2024
1 parent c2ef4de commit 7d7d8e7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions VPet-Simulator.Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2092,18 +2092,20 @@ public void DisplayFoodAnimation(string graphName, ImageSource imageSource)
Main.Display(graphName, imageSource, () =>
{
showeatanm = true;
var newmod = Core.Save.CalMode();
if (Core.Save.Mode != newmod)
if (Core.Controller.EnableFunction)
{
//魔改下参数以免不播放切换动画
Main.DisplayType.Type = GraphType.Default;
//切换显示动画
Main.PlaySwitchAnimat(Core.Save.Mode, newmod);
Core.Save.Mode = newmod;
var newmod = Core.Save.CalMode();
if (Core.Save.Mode != newmod)
{
//魔改下参数以免不播放切换动画
Main.DisplayType.Type = GraphType.Default;
//切换显示动画
Main.PlaySwitchAnimat(Core.Save.Mode, newmod);
Core.Save.Mode = newmod;
}
else
Main.DisplayToNomal();
}
else
Main.DisplayToNomal();

});
}
else
Expand Down

0 comments on commit 7d7d8e7

Please sign in to comment.