using System.Collections;
using System.Collections.Generic;
using UnityEditor.EditorTools;
using UnityEngine;
///
/// 物品类型
///
public enum ItemType { 材料, 装备 }
///
/// 物品 - 数据
///
public class DataItem {
/// 物品名称
public string name;
/// 物品类型
public ItemType itemType;
}
///
/// 材料 - 数据
///
public class DataMaterial : DataItem {
/// 物品数量
public int quantity;
/// 堆叠上限
public int maxStack;
}
///
/// 穿戴类型
///
public enum WearType { 武器, 护甲, 头盔, 手套, 鞋子, }
///
/// 穿戴 - 数据
///
public class DataWear : DataItem {
/// 装备类型
public WearType wearType;
/// 附加列表
public List additions = new List();
/// 附加效果
public virtual DataAddition Addition => EquipmentTool.Merge(additions);
}
///
/// 武器类型。
///
public enum WeaponType { 轻型武器, 中型武器, 重型武器, 盾牌, }
///
/// 武器 - 数据
///
public class DataWeapon : DataWear {
/// 武器类型
public WeaponType weaponType;
}
///
/// 护甲类型。
///
public enum ArmorType { 布甲, 轻甲, 中甲, 重甲, }
///
/// 护甲 - 数据
///
public class DataArmor : DataWear {
/// 护甲类型
public ArmorType armorType;
}