42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using GUPS.AntiCheat.Protected;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
public enum eInAppInitType { None, Week, Mini_One, One1, One2, Disable_Buy1, Disable_Buy2 }
|
|
public enum eShopBuyType { IAP, AD, Coin, Heart }
|
|
|
|
[Serializable]
|
|
public class shoptabledata
|
|
{
|
|
public string s_ID, s_Name, s_PeakEffective, s_Items;
|
|
public eInAppInitType e_InAppInitType;
|
|
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(); } }
|
|
ProtectedBool _AdRemove; public bool b_AdRemove { get { return _AdRemove; } set { _AdRemove = value; _AdRemove.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)); }
|
|
} |