Shegotwet/Assets/ResWork/Table/table_shop.cs

40 lines
1.5 KiB
C#
Raw Normal View History

using GUPS.AntiCheat.Protected;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
public enum eShopBuyType { IAP, AD, Coin }
[Serializable]
public class shoptabledata
{
public string s_ID, s_PeakEffective, s_Items;
public eShopBuyType e_BuyType;
ProtectedInt32 _Price; public int n_Price { get { return _Price; } set { _Price = value; _Price.Obfuscate(); } }
ProtectedInt32 _RewardHeart; public int n_RewardHeart { get { return _RewardHeart; } set { _RewardHeart = value; _RewardHeart.Obfuscate(); } }
ProtectedInt32 _RewardChatCoin; public int n_RewardChatCoin { get { return _RewardChatCoin; } set { _RewardChatCoin = value; _RewardChatCoin.Obfuscate(); } }
ProtectedInt32 _RewardGacha; public int n_RewardGacha { get { return _RewardGacha; } set { _RewardGacha = value; _RewardGacha.Obfuscate(); } }
ProtectedInt32 _ADSec; public int n_ADSec { get { return _ADSec; } set { _ADSec = value; _ADSec.Obfuscate(); } }
}
public class table_shop : table_base
{
public static table_shop Ins;
List<shoptabledata> tableDatas;
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<shoptabledata>>(json_last);
base.Start();
}
public List<shoptabledata> Get_DataList() { return tableDatas; }
public shoptabledata Get_Data(string id) { return Get_DataList().Find(f => f.s_ID.Equals(id)); }
}