43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using UnityEngine;
|
||
using BaseGames.Equipment;
|
||
|
||
namespace BaseGames.World.Shop
|
||
{
|
||
/// <summary>
|
||
/// 商店单品 SO(架构 15_MapShopModule §2.1)。
|
||
/// 资产路径: Assets/ScriptableObjects/Shop/Item_{ItemId}.asset
|
||
/// </summary>
|
||
[CreateAssetMenu(menuName = "World/Shop/ShopItem")]
|
||
public class ShopItemSO : ScriptableObject
|
||
{
|
||
[Header("标识")]
|
||
public string ItemId;
|
||
public string DisplayName;
|
||
[TextArea(2, 5)]
|
||
public string Description;
|
||
public Sprite Icon;
|
||
|
||
[Header("价格")]
|
||
public int BasePrice;
|
||
public bool IsUnique; // 购买一次后永久从库存移除
|
||
|
||
[Header("商品类型")]
|
||
public ShopItemType ItemType;
|
||
|
||
// 按 ItemType 填写以下字段(其余留空)
|
||
public int HealthRestoreAmount; // HealthRestoration 类型
|
||
public CharmSO CharmReference; // CharmItem 类型
|
||
public string KeyItemId; // KeyItem 类型
|
||
public int MaxPurchaseCount = -1; // -1 = 无限次
|
||
}
|
||
|
||
public enum ShopItemType
|
||
{
|
||
HealthRestoration,
|
||
CharmItem,
|
||
KeyItem,
|
||
ConsumableBuff,
|
||
MapFragment,
|
||
}
|
||
}
|