| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | using System; |
| | | |
| | | |
| | | public class MainLevelManager : GameSystemManager<MainLevelManager> |
| | | { |
| | | |
| | | public Dictionary<int, int> m_DailyBootyDict = new Dictionary<int, int>(); |
| | | public event Action OnUpdateDayBooty; |
| | | public override void Init() |
| | | { |
| | | base.Init(); |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize; |
| | | } |
| | | |
| | | public override void Release() |
| | | { |
| | | base.Release(); |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize; |
| | | } |
| | | |
| | | |
| | | private void OnBeforePlayerDataInitialize() |
| | | { |
| | | m_DailyBootyDict.Clear(); |
| | | } |
| | | |
| | | public void UpdateDayDropBooty(HB123_tagSCDropBootyInfo netPack) |
| | | { |
| | | for (int i = 0; i < netPack.Count; i++) |
| | | { |
| | | m_DailyBootyDict[(int)netPack.DropBootyList[i].ItemID] = (int)netPack.DropBootyList[i].TodayDropCnt; |
| | | } |
| | | OnUpdateDayBooty?.Invoke(); |
| | | } |
| | | |
| | | } |