商店除发放和货币扣除,其余部分完毕。加入药水icon免费包
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "77xxx_storeItem", menuName = "Store/StoreItem")]
|
||||
public class storeItemSO : ScriptableObject
|
||||
{
|
||||
[Header("Basic Info")]
|
||||
public string itemName;
|
||||
public Sprite itemIcon;
|
||||
public int itemID; // Unique identifier for the item
|
||||
public int itemSinglePurchaseQty; // 物品单次购买数量
|
||||
public int itemPurchaseQuota; // 物品限购配额,-1为不限购
|
||||
[TextArea(3, 3)] public string itemDescription;
|
||||
[TextArea(3, 10)] public string itemDetailedDescription; // 这个是用来在物品详情界面显示的更详细的描述文本的
|
||||
|
||||
[Header("Item Type")]
|
||||
public bool isOnShelf = true; // Indicates if the item is currently available for purchase
|
||||
public bool canbepurchased = true; // Indicates if the item can be purchased with coins
|
||||
public bool isHot = false; // Indicates if the item is a hot item (for promotional purposes)
|
||||
public bool user_has_read = false; // 用户是否已经查看过这个物品
|
||||
public ItemType itemType;
|
||||
public Player_SO associatedPlayer; // Only used if itemType is character
|
||||
public SongData associatedSong; // Only used if itemType is song
|
||||
public notebook_faterType associatedStoryPassage; // Only used if itemType is storyPassage
|
||||
|
||||
[Header("Purchase Cost")]
|
||||
public List<CostRequirement> costRequirements = new List<CostRequirement>();
|
||||
|
||||
[Header("Unlock Conditions")]
|
||||
public List<UnlockRequirement> unlockRequirements = new List<UnlockRequirement>();
|
||||
|
||||
[Header("Runtime Save Data")]
|
||||
public int purchasedCount; // 已购数量,会参与持久化
|
||||
|
||||
public enum ItemType
|
||||
{
|
||||
character,
|
||||
song,
|
||||
storyPassage,
|
||||
consumable,
|
||||
otherType
|
||||
}
|
||||
|
||||
public enum CurrencyType
|
||||
{
|
||||
coins,
|
||||
}
|
||||
|
||||
public enum RequirementType
|
||||
{
|
||||
none,
|
||||
level,
|
||||
clearSong,
|
||||
storyProgress
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class CostRequirement
|
||||
{
|
||||
public CurrencyType currencyType;
|
||||
public int amount;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class UnlockRequirement
|
||||
{
|
||||
public RequirementType requirementType;
|
||||
public int value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user