Json 文件:
{
"_Type": "Material",
"_Quality": "Epic",
"_ID": 4,
"_Count": 2,
"_BuyPrice": 3000,
"_SellPrice": 1500,
"_Name": "蓝宝石",
"_Description": "这个是史诗级的合成材料!",
"_Sprite": "gem"
}
Item 实体类:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item
{
/// <summary>
/// 物品类型
/// </summary>
public enum _Item_Type
{
Consumable,
Equipment,
Weapon,
Material
}
/// <summary>
/// 物品品质
/// </summary>
public enum _Item_Quality
{
Poor,
Common,
Uncommon,
Rare,
Epic,
Legendary,
Heirloom
}