From f84dfd0ae8885a8eea851fcaff64895b93b1edd3 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 24 Nov 2023 13:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=8F=E8=84=B8=E5=A2=9E=E5=8A=A0=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=88=A4=E6=96=AD=E5=92=8C=E5=BF=83=E6=83=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index e8ceaa8..7cc8ac3 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -1668,7 +1668,7 @@ namespace VPet_Simulator.Windows var pin = Core.Graph.GraphConfig.Data["pinch"]; Main.Core.TouchEvent.Insert(0, new TouchArea( new Point(pin[(gdbe)"px"], pin[(gdbe)"py"]), new Size(pin[(gdbe)"sw"], pin[(gdbe)"sh"]) - , () => { DisplayPinch(); return true; }, true)); + , DisplayPinch, true)); } @@ -1752,9 +1752,14 @@ namespace VPet_Simulator.Windows /// /// 显示捏脸情况 /// - public void DisplayPinch() + public bool DisplayPinch() { + if (Core.Graph.FindGraphs("pinch", AnimatType.A_Start, Core.Save.Mode) == null) + { + return false; + } Main.CountNomal = 0; + if (Core.Controller.EnableFunction && Core.Save.Strength >= 10 && Core.Save.Feeling < 100) { Core.Save.StrengthChange(-2); @@ -1765,28 +1770,36 @@ namespace VPet_Simulator.Windows if (Main.DisplayType.Name == "pinch") { if (Main.DisplayType.Animat == AnimatType.A_Start) - return; + return false; else if (Main.DisplayType.Animat == AnimatType.B_Loop) if (Dispatcher.Invoke(() => Main.PetGrid.Tag) is IGraph ig && ig.GraphInfo.Name == "pinch" && ig.GraphInfo.Animat == AnimatType.B_Loop) { ig.IsContinue = true; - return; + return true; } else if (Dispatcher.Invoke(() => Main.PetGrid2.Tag) is IGraph ig2 && ig2.GraphInfo.Name == "pinch" && ig2.GraphInfo.Animat == AnimatType.B_Loop) { ig2.IsContinue = true; - return; + return true; } } Main_Event_TouchHead(); Main_Event_TouchBody(); Main.Display("pinch", AnimatType.A_Start, () => Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop)); + return true; } private void DisplayPinch_loop() { if (Main.isPress && Main.DisplayType.Name == "pinch" && Main.DisplayType.Animat == AnimatType.B_Loop) { + if (Core.Controller.EnableFunction && Core.Save.Strength >= 10 && Core.Save.Feeling < 100) + { + Core.Save.StrengthChange(-2); + Core.Save.FeelingChange(1); + Core.Save.Mode = Core.Save.CalMode(); + Main.LabelDisplayShowChangeNumber(LocalizeCore.Translate("体力-{0:f0} 心情+{1:f0}"), 2, 1); + } Main.Display("pinch", AnimatType.B_Loop, DisplayPinch_loop); } else