喂食调用接口 #417

This commit is contained in:
ZouJin 2024-08-19 23:26:34 +08:00
parent 4767cb96d2
commit 32f11dbe7d
2 changed files with 11 additions and 1 deletions

View File

@ -234,7 +234,11 @@ namespace VPet_Simulator.Windows.Interface
/// <summary>
/// 所有可用套餐
/// </summary>
List<PackageFull> SchedulePackage { get;}
List<PackageFull> SchedulePackage { get; }
/// <summary>
/// 事件:吃东西
/// </summary>
event Action<Food> Event_TakeItem;
}
}

View File

@ -617,6 +617,10 @@ namespace VPet_Simulator.Windows
}
/// <summary>
/// 事件:吃东西
/// </summary>
public event Action<Food> Event_TakeItem;
/// <summary>
/// 使用/食用物品 (不包括显示动画)
/// </summary>
/// <param name="item">物品</param>
@ -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)