From 096cf95efdab33ddd98308e85b113d7e9cec1cd5 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sat, 17 Feb 2024 13:54:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Didel=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BAA+=E6=94=AF=E6=8C=81SingleIDEL?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainDisplay.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs index 752427e..de4e8b2 100644 --- a/VPet-Simulator.Core/Display/MainDisplay.cs +++ b/VPet-Simulator.Core/Display/MainDisplay.cs @@ -295,15 +295,24 @@ namespace VPet_Simulator.Core { var idelname = list[i]; var ig = Core.Graph.FindGraphs(idelname, AnimatType.A_Start, Core.Save.Mode); - if (ig != null) + if (ig != null && ig.Count != 0) { looptimes = 0; CountNomal = 0; - DisplayBLoopingToNomal(idelname, Core.Graph.GraphConfig.GetDuration(idelname)); + Display(ig[Function.Rnd.Next(ig.Count)], () => + DisplayBLoopingToNomal(idelname, Core.Graph.GraphConfig.GetDuration(idelname))); return true; } else { + ig = Core.Graph.FindGraphs(idelname, AnimatType.Single, Core.Save.Mode); + if (ig != null && ig.Count != 0) + { + looptimes = 0; + CountNomal = 0; + Display(ig[Function.Rnd.Next(ig.Count)], DisplayToNomal); + return true; + } list.RemoveAt(i); } }