using MoleMole.Config; using UnityEngine.UI; using proto; namespace MoleMole { public class InLevelRechargeDialogContext : BaseDialogContext { private InLevelReviveDialogContext _reviveContext; private MonoShopRechargeTab _rechargeTab; public InLevelRechargeDialogContext(InLevelReviveDialogContext reviveContext) { config = new ContextPattern { contextName = "InLevelRechargeDialogContext", viewPrefabPath = "UI/Menus/Dialog/InLevelShopDialog" }; _reviveContext = reviveContext; } public override bool OnPacket(NetPacketV1 pkt) { ushort cmdId = pkt.getCmdId(); if (cmdId == 83) { return OnRechargeSuccNotify(pkt.getData()); } return false; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.RefreshRechargeTab) { return OnRefreshRechargeTab(); } if (ntf.type == NotifyTypes.SelectRechargeItem) { return OnSelectProduct((string)ntf.body); } return false; } protected override bool SetupView() { _reviveContext.SetActive(false); _rechargeTab = base.view.transform.Find("Dialog/RechargeTab").GetComponent(); _rechargeTab.SetupView(); base.view.transform.Find("Dialog/CartInfoPanel/Info").gameObject.SetActive(false); return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("Dialog/CloseBtn").GetComponent