32 lines
873 B
C#
32 lines
873 B
C#
![]() |
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;
|
||
|
}
|
||
|
|
||
|
}
|