From 32f11dbe7d19c6ca7a83a2d1290dc6dcbdc7f0f2 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 19 Aug 2024 23:26:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=82=E9=A3=9F=E8=B0=83=E7=94=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20#417?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows.Interface/IMainWindow.cs | 6 +++++- VPet-Simulator.Windows/MainWindow.cs | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows.Interface/IMainWindow.cs b/VPet-Simulator.Windows.Interface/IMainWindow.cs index 2ac1c7e..3d70f03 100644 --- a/VPet-Simulator.Windows.Interface/IMainWindow.cs +++ b/VPet-Simulator.Windows.Interface/IMainWindow.cs @@ -234,7 +234,11 @@ namespace VPet_Simulator.Windows.Interface /// /// 所有可用套餐 /// - List SchedulePackage { get;} + List SchedulePackage { get; } + /// + /// 事件:吃东西 + /// + event Action Event_TakeItem; } } diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 6ba8f16..19651d2 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -617,6 +617,10 @@ namespace VPet_Simulator.Windows } /// + /// 事件:吃东西 + /// + public event Action Event_TakeItem; + /// /// 使用/食用物品 (不包括显示动画) /// /// 物品 @@ -678,6 +682,8 @@ namespace VPet_Simulator.Windows GameSavesData.Statistics[(gdbe)"stat_bb_gift_like"] += item.Likability; break; } + + Event_TakeItem.Invoke(item); } public void RunAction(string action)