From 76461367b26f8a0e5b0855375bcc8d07311f9122 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 24 Jul 2023 11:52:27 +1000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=98=B2=E6=AD=A2=E7=A9=BA?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E5=BE=AA=E7=8E=AF=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainDisplay.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs index f9e63f1..36a6189 100644 --- a/VPet-Simulator.Core/Display/MainDisplay.cs +++ b/VPet-Simulator.Core/Display/MainDisplay.cs @@ -123,7 +123,7 @@ namespace VPet_Simulator.Core if (!DisplayStop(EndAction)) EndAction?.Invoke(); } - + /// /// 尝试触发移动 /// @@ -490,6 +490,7 @@ namespace VPet_Simulator.Core Display(Core.Graph.FindGraph(name, animat, Core.Save.Mode), EndAction); } bool petgridcrlf = true; + int nodisplayLoop = 0; /// /// 显示动画 (自动多层切换) /// @@ -499,9 +500,28 @@ namespace VPet_Simulator.Core { if (graph == null) { - EndAction?.Invoke(); + if (nodisplayLoop++ > 20) + {//无动画时运行兼容性动画 + if (nodisplayLoop < 100) + Display(GraphType.Default, AnimatType.Single, EndAction); + else + {//连Nomal都没有, 证明是未完成的动画, 修改设置+退出游戏 + Dispatcher.Invoke(() => + { + LabelDisplay.Content = "未找到可播放动画, 已停止运行桌宠模块".Translate(); + LabelDisplay.Visibility = Visibility.Visible; + IsEnabled = false; + }); + } + } + else + EndAction?.Invoke(); return; } + else + { + nodisplayLoop = 0; + } //if(graph.GraphType == GraphType.Climb_Up_Left) //{ // Dispatcher.Invoke(() => Say(graph.GraphType.ToString()));