2024-11-23 17:20:13 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using BITKit;
|
|
|
|
|
|
|
|
namespace Net.Project.B.Inventory
|
|
|
|
{
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 玩家背包
|
|
|
|
/// </summary>
|
|
|
|
public interface IPlayerInventory
|
|
|
|
{
|
2025-04-14 15:39:24 +08:00
|
|
|
int Size { get; }
|
2024-11-23 17:20:13 +08:00
|
|
|
/// <summary>
|
|
|
|
/// 背包
|
|
|
|
/// </summary>
|
|
|
|
public IRuntimeItemContainer Container { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 拾取物品的工厂方法
|
|
|
|
/// </summary>
|
|
|
|
event Action<IRuntimeItem> OnPickupItemFactory;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 使用物品的工厂方法,如果返回true则代表物品已被其他逻辑处理
|
|
|
|
/// </summary>
|
|
|
|
event Action<IRuntimeItem> UseFactory;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 使用物品的事件,如果返回true则代表物品已被其他逻辑处理
|
|
|
|
/// </summary>
|
|
|
|
event Action<IRuntimeItem> OnUsedItem;
|
|
|
|
|
2025-04-14 15:39:24 +08:00
|
|
|
event Func<IRuntimeItem,bool> ConsumeFactory;
|
|
|
|
|
|
|
|
event Action<IRuntimeItem> OnConsumedItem;
|
|
|
|
|
2024-11-23 17:20:13 +08:00
|
|
|
void UseItem(int id);
|
2025-04-14 15:39:24 +08:00
|
|
|
void ConsumeItem(int id);
|
2024-11-23 17:20:13 +08:00
|
|
|
}
|
|
|
|
}
|