using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class CabinOverviewPageContext : BasePageContext { private CabinDataItemBase _cabinData; private Dictionary _buildingDataDict; private Dictionary _data2BuildingDict; private Camera _mainCamera; private Camera _uiCamera; private CanvasTimer _pageFadeOutTimer; private int PAGE_FADE_OUT_TRIGGER_ID = Animator.StringToHash("PageFadeOut"); private bool _waitingForVentureList; private bool _cameraFocusEnd; public CabinOverviewPageContext(CabinDataItemBase cabinData, Dictionary buildingDataDict) { config = new ContextPattern { contextName = "CabinOverviewPageContext", viewPrefabPath = "UI/Menus/Page/Island/IslandCabinOverviewPage", cacheType = ViewCacheType.AlwaysCached }; _cabinData = cabinData; _buildingDataDict = buildingDataDict; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.OnIslandCameraPreLanded) { return OnIslandCameraLanded((MonoIslandBuilding)ntf.body); } if (ntf.type == NotifyTypes.OnIslandCameraPreFocus) { return OnIslandCameraFocus(); } if (ntf.type == NotifyTypes.OnCabinBeginExtend) { return OnBeginExtend((int)ntf.body); } return false; } public override bool OnPacket(NetPacketV1 pkt) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Invalid comparison between Unknown and I4 ushort cmdId = pkt.getCmdId(); switch (cmdId) { case 157: return DoSetupView(); case 169: if ((int)_cabinData.cabinType == 5 && _waitingForVentureList) { _waitingForVentureList = false; if (_cameraFocusEnd) { return DoEnterCabin(); } } break; } if (cmdId == 163) { OnFinishCabinLevelUpRsp(pkt.getData()); } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("ActionPanel/EnhanceBtns/LevelUpBtn/Btn").GetComponent