2024-11-23 17:20:13 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using BITKit;
|
|
|
|
using BITKit.StateMachine;
|
|
|
|
|
|
|
|
namespace Net.Project.B.Inventory
|
|
|
|
{
|
2025-02-24 23:02:49 +08:00
|
|
|
|
2024-11-23 17:20:13 +08:00
|
|
|
/// <summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
/// 玩家控制器
|
2024-11-23 17:20:13 +08:00
|
|
|
/// </summary>
|
|
|
|
public interface IPlayerWeaponController:IStateAsync{}
|
|
|
|
/// <summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
/// 玩家泛型控制器
|
2024-11-23 17:20:13 +08:00
|
|
|
/// </summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
public interface IPlayerWeaponController<T>:IPlayerWeaponController{}
|
2024-11-23 17:20:13 +08:00
|
|
|
/// <summary>
|
|
|
|
/// 玩家武器库存,与背包不是一个东西
|
|
|
|
/// </summary>
|
|
|
|
public interface IPlayerWeaponInventory
|
|
|
|
{
|
|
|
|
/// <summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
/// 允许使用武器
|
2024-11-23 17:20:13 +08:00
|
|
|
/// </summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
public ValidHandle AllowWeapon { get; }
|
2024-11-23 17:20:13 +08:00
|
|
|
/// <summary>
|
|
|
|
/// 武器控制器状态机
|
|
|
|
/// </summary>
|
|
|
|
public IStateMachine<IPlayerWeaponController> StateMachine { get; }
|
|
|
|
/// <summary>
|
|
|
|
/// 丢下武器
|
|
|
|
/// </summary>
|
2025-02-24 23:02:49 +08:00
|
|
|
/// <param name="itemId"></param>
|
|
|
|
void Drop(int itemId);
|
2025-08-05 23:34:30 +08:00
|
|
|
/// <summary>
|
|
|
|
/// 使用武器
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="itemId"></param>
|
|
|
|
/// <param name="controller"></param>
|
|
|
|
/// <returns></returns>
|
2025-08-03 02:28:22 +08:00
|
|
|
bool Draw(int itemId,out IPlayerWeaponController controller);
|
2025-08-05 23:34:30 +08:00
|
|
|
/// <summary>
|
|
|
|
/// 使用主要武器
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
bool DrawPrimaryWeapon();
|
2024-11-23 17:20:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|