From 210d2abf91b9322d568ddc63d040689923479a26 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Wed, 15 May 2024 15:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=87=E6=8D=A2=E7=AA=97?= =?UTF-8?q?=E6=A0=BC=E6=97=B6=E5=8A=A8=E7=94=BB=E5=AF=B9=E6=AF=94=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainDisplay.cs | 4 ++-- VPet-Simulator.Core/Graph/IGraph.cs | 2 +- VPet-Simulator.Core/Graph/PNGAnimation.cs | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs index 7bebb93..4f17d35 100644 --- a/VPet-Simulator.Core/Display/MainDisplay.cs +++ b/VPet-Simulator.Core/Display/MainDisplay.cs @@ -502,7 +502,7 @@ namespace VPet_Simulator.Core GraphDisplayHandler?.Invoke(graph.GraphInfo); var PetGridTag = Dispatcher.Invoke(() => PetGrid.Tag); var PetGrid2Tag = Dispatcher.Invoke(() => PetGrid2.Tag); - if (PetGridTag == graph) + if (graph.Equals(PetGridTag)) { petgridcrlf = true; ((IGraph)(PetGrid2Tag)).Stop(true); @@ -514,7 +514,7 @@ namespace VPet_Simulator.Core graph.Run(PetGrid, EndAction);//(x) => PetGrid.Child = x return; } - else if (PetGrid2Tag == graph) + else if (graph.Equals(PetGrid2Tag)) { petgridcrlf = false; ((IGraph)(PetGridTag)).Stop(true); diff --git a/VPet-Simulator.Core/Graph/IGraph.cs b/VPet-Simulator.Core/Graph/IGraph.cs index dcc58a7..9860cfe 100644 --- a/VPet-Simulator.Core/Graph/IGraph.cs +++ b/VPet-Simulator.Core/Graph/IGraph.cs @@ -7,7 +7,7 @@ namespace VPet_Simulator.Core /// /// 动画显示接口 /// - public interface IGraph + public interface IGraph : IEquatable { /// /// 从0开始运行该动画 diff --git a/VPet-Simulator.Core/Graph/PNGAnimation.cs b/VPet-Simulator.Core/Graph/PNGAnimation.cs index efc5374..36a9075 100644 --- a/VPet-Simulator.Core/Graph/PNGAnimation.cs +++ b/VPet-Simulator.Core/Graph/PNGAnimation.cs @@ -330,7 +330,5 @@ namespace VPet_Simulator.Core return new Task(() => Animations[0].Run(img, Control)); }); } - - } }