1
This commit is contained in:
81
Src/Inventory/IPlayerWeaponInventory.cs
Normal file
81
Src/Inventory/IPlayerWeaponInventory.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.StateMachine;
|
||||
|
||||
namespace Net.Project.B.Inventory
|
||||
{
|
||||
/// <summary>
|
||||
/// 玩家武器槽
|
||||
/// </summary>
|
||||
public enum PlayerWeaponSlot
|
||||
{
|
||||
/// <summary>
|
||||
/// 主武器
|
||||
/// </summary>
|
||||
Primary,
|
||||
/// <summary>
|
||||
/// 主武器2
|
||||
/// </summary>
|
||||
Secondary,
|
||||
/// <summary>
|
||||
/// 副武器,例如手枪,近战武器等
|
||||
/// </summary>
|
||||
Sidearm,
|
||||
/// <summary>
|
||||
/// 消耗品,通常是护甲,医疗包等
|
||||
/// </summary>
|
||||
Supplies,
|
||||
/// <summary>
|
||||
/// 战术道具
|
||||
/// </summary>
|
||||
Tactics,
|
||||
/// <summary>
|
||||
/// 致命道具
|
||||
/// </summary>
|
||||
Lethal,
|
||||
/// <summary>
|
||||
/// 连杀奖励,特别的武器
|
||||
/// </summary>
|
||||
KillStreak
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家武器控制器
|
||||
/// </summary>
|
||||
public interface IPlayerWeaponController:IStateAsync{}
|
||||
/// <summary>
|
||||
/// 玩家枪支控制器
|
||||
/// </summary>
|
||||
public interface IPlayerGunController:IPlayerWeaponController{}
|
||||
/// <summary>
|
||||
/// 玩家近战武器控制器
|
||||
/// </summary>
|
||||
public interface IPlayerMeleeController:IPlayerWeaponController{}
|
||||
/// <summary>
|
||||
/// 玩家武器库存,与背包不是一个东西
|
||||
/// </summary>
|
||||
public interface IPlayerWeaponInventory
|
||||
{
|
||||
/// <summary>
|
||||
/// 武器槽
|
||||
/// </summary>
|
||||
public IReadOnlyDictionary<PlayerWeaponSlot,int> WeaponSlots { get; }
|
||||
/// <summary>
|
||||
/// 武器控制器状态机
|
||||
/// </summary>
|
||||
public IStateMachine<IPlayerWeaponController> StateMachine { get; }
|
||||
/// <summary>
|
||||
/// 武器槽更新回调,参数为:slot,ItemId,IsAdd
|
||||
/// </summary>
|
||||
public event Action<PlayerWeaponSlot, int, bool> OnWeaponSlotChanged;
|
||||
/// <summary>
|
||||
/// 丢下武器
|
||||
/// </summary>
|
||||
/// <param name="slot"></param>
|
||||
void Drop(PlayerWeaponSlot slot);
|
||||
void Use(PlayerWeaponSlot slot);
|
||||
void Use(int id);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user