1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class RechargeDataManager : SingletonBase<RechargeDataManager>
- {
- private Dictionary<int, int> _rechargeDic = new Dictionary<int, int>();
- private Dictionary<int, int> _giftDic = new Dictionary<int, int>();
- private Dictionary<int, int> _exchangeDic = new Dictionary<int, int>();
- public void Clear()
- {
- _rechargeDic.Clear();
- _giftDic.Clear();
- _exchangeDic.Clear();
- }
- public void UpdateRechargeData(int rechargeId, int num)
- {
- if (!_rechargeDic.ContainsKey(rechargeId))
- {
- _rechargeDic.Add(rechargeId, num);
- }
- else
- {
- _rechargeDic[rechargeId] = num;
- }
- }
- public void UpdateGiftData(int giftId, int num)
- {
- if (!_giftDic.ContainsKey(giftId))
- {
- _giftDic.Add(giftId, num);
- }
- else
- {
- _giftDic[giftId] = num;
- }
- }
- public void UpdateExchangeData(int exchangeId, int num)
- {
- if (!_exchangeDic.ContainsKey(exchangeId))
- {
- _exchangeDic.Add(exchangeId, num);
- }
- else
- {
- _exchangeDic[exchangeId] = num;
- }
- }
- public List<GiftBagCfg> GetGiftBagDatas()
- {
- GiftBagCfg[] giftBagCfgs = GiftBagCfgArray.Instance.dataArray;
- List<GiftBagCfg> giftBagDatas = new List<GiftBagCfg>();
- for (int i = 0; i < giftBagCfgs.Length; i++)
- {
- }
- return giftBagDatas;
- }
- }
- }
|