Files
Net.Like.Xue.Tokyo/Packages-Local/Com.Project.B.Unity/BuyStation/ScriptableBuyStationItemList.cs

32 lines
873 B
C#
Raw Normal View History

2025-06-24 23:49:13 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using AYellowpaper.SerializedCollections;
using Project.B.Item;
using UnityEngine;
namespace Net.Project.B.Inventory
{
public class ScriptableBuyStationItemList : ScriptableObject
{
[Serializable]
internal class ItemInfo:BuyStationComponent
{
[SerializeField] internal ScriptableItem scriptableItem;
[SerializeField] internal int price;
public override int Price
{
get =>price is 0 ? scriptableItem.Value:price;
set => price = value;
}
public override int ScriptableId => scriptableItem.Id;
}
[SerializeField] internal List<ItemInfo> itemList;
public IReadOnlyCollection<BuyStationComponent> ItemList => itemList;
}
}