using System; using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 插槽类型 /// public enum EquipmentSlotType { 主手, 副手, 上衣, 项链, 头盔, 手套, 腰带, 鞋子, 戒指1, 戒指2, 手镯1, 手镯2 } /// /// 装备插槽 /// public class EquipmentSlot { /// 名字 public string name; /// 物品 public Equipment item; /// 装备验证 public Func verify; public EquipmentSlot(EquipmentSlotType slot, Func verify) { name = slot.ToString(); this.verify = verify; } /// 设置 public void Settings(InventoryItem item) { if (item is Equipment equipment) { this.item = equipment; } else { this.item = null; } } }