修改切换窗格时动画对比方式

This commit is contained in:
ZouJin 2024-05-15 15:31:22 +08:00
parent 1745a8f351
commit 210d2abf91
3 changed files with 3 additions and 5 deletions

View File

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

View File

@ -7,7 +7,7 @@ namespace VPet_Simulator.Core
/// <summary>
/// 动画显示接口
/// </summary>
public interface IGraph
public interface IGraph : IEquatable<object>
{
/// <summary>
/// 从0开始运行该动画

View File

@ -330,7 +330,5 @@ namespace VPet_Simulator.Core
return new Task(() => Animations[0].Run(img, Control));
});
}
}
}