using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using proto; namespace MoleMole { public class BulletinBoardDialogContext : BaseSequenceDialogContext { public enum ShowType { ShowEvent = 0, ShowSystem = 1 } private ShowType _showType; private Dictionary _selectIdDict; private List _showList; public BulletinBoardDialogContext(ShowType showType = ShowType.ShowEvent) { config = new ContextPattern { contextName = "BulletinBoardDialogContext", viewPrefabPath = "UI/Menus/Dialog/BulletinBoard/BulletinBoardDialog" }; _showType = showType; _selectIdDict = new Dictionary(); _selectIdDict.Add(ShowType.ShowEvent, 0u); _selectIdDict.Add(ShowType.ShowSystem, 0u); } public override bool OnPacket(NetPacketV1 pkt) { ushort cmdId = pkt.getCmdId(); if (cmdId == 138) { return OnGetBulletinRsp(pkt.getData()); } return false; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.DownloadResAssetSucc) { return OnDownloadResAssetSucc(); } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("BG"), EventTriggerType.PointerClick, OnBGClick); BindViewCallback(base.view.transform.Find("Dialog/CloseBtn").GetComponent