using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class StoragePowerUpPageContext : BasePageContext { public const int MAX_SELECT_NUM = 6; public readonly StorageDataItemBase storageItem; public AvatarDataItem uiEquipOwner; private StorageDataItemBase _storageItemBeforePowerup; private List _resourceList; public StoragePowerUpPageContext(StorageDataItemBase storageItem) { config = new ContextPattern { contextName = "StoragePowerUpPageContext", viewPrefabPath = "UI/Menus/Page/Storage/WeaponPowerUpPage" }; if (storageItem is StigmataDataItem) { config.viewPrefabPath = "UI/Menus/Page/Storage/StigmataPowerUpPage"; } this.storageItem = storageItem; _resourceList = new List(); } public override bool OnNotify(Notify ntf) { return false; } public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 32: return OnEquipmentPowerUpRsp(pkt.getData()); case 75: SetupItemProtectedStatus(); break; } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("ActionBtns/OkBtn").GetComponent