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)); }); } - - } }