mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复可能和L2D插件引起的错误
This commit is contained in:
parent
1f82987fd5
commit
0e0843bad8
@ -102,17 +102,12 @@ namespace VPet_Simulator.Core
|
||||
public void Load_4_Start(IGraph startUPGraph = null)
|
||||
{
|
||||
IGraph ig = startUPGraph ?? Core.Graph.FindGraph(Core.Graph.FindName(GraphType.StartUP), AnimatType.Single, Core.Save.Mode);
|
||||
ig ??= Core.Graph.FindGraph(Core.Graph.FindName(GraphType.Default), AnimatType.Single, Core.Save.Mode);
|
||||
ig ??= Core.Graph.FindGraph(Core.Graph.FindName(GraphType.Default), AnimatType.Single, Core.Save.Mode);
|
||||
Task.Run(() =>
|
||||
{
|
||||
ig.Run(PetGrid, () =>
|
||||
{
|
||||
IsWorking = true;
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
PetGrid.Tag = ig;
|
||||
PetGrid2.Tag = ig;
|
||||
});
|
||||
{
|
||||
IsWorking = true;
|
||||
DisplayNomal();
|
||||
});
|
||||
});
|
||||
|
@ -505,7 +505,8 @@ namespace VPet_Simulator.Core
|
||||
if (graph.Equals(PetGridTag))
|
||||
{
|
||||
petgridcrlf = true;
|
||||
((IGraph)(PetGrid2Tag)).Stop(true);
|
||||
if(PetGrid2Tag is IGraph ig)
|
||||
ig.Stop(true);
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
PetGrid.Visibility = Visibility.Visible;
|
||||
@ -517,7 +518,8 @@ namespace VPet_Simulator.Core
|
||||
else if (graph.Equals(PetGrid2Tag))
|
||||
{
|
||||
petgridcrlf = false;
|
||||
((IGraph)(PetGridTag)).Stop(true);
|
||||
if (PetGridTag is IGraph ig)
|
||||
ig.Stop(true);
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
PetGrid2.Visibility = Visibility.Visible;
|
||||
|
Loading…
Reference in New Issue
Block a user