using System; using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class LevelResultDialogContext : BaseDialogContext { private const int MAX_TEAM_MEMBER_NUM = 3; private const int DROP_ITEM_ANI_MAX_COUNT = 9; private const string DROP_ANI_CALL_BACK_STR = "Play_drop"; private const string DROP_ITEM_SCALE_07 = "DropItemScale07"; private const string AVATAR_NULL_BG_PATH = "SpriteOutput/AvatarTachie/BgType4"; private StageEndRsp _stageEndRsp; private FriendDetailDataItem _helperInfo; private LevelDataItem _levelData; private int _dropItemAniCount; private MonoGridScroller _dropScroller; private List _dropItemList; private DropItem _normalDropItem; private DropItem _fastDropItem; private DropItem _sonicDropItem; private PlayerLevelUpDialogContext _playerLevelUpDialogContext; private SequenceDialogManager _playerLevelUpAndAvatarNewSkillDialogManager; private bool _avatarCanUnlockSkillDialogShowAlready; private SequenceAnimationManager _leftPanelAnimationManager; private SequenceAnimationManager _dropPanelBGAnimationManager; private SequenceAnimationManager _dropItemAnimationManager; private SequenceDialogManager _dropNewItemDialogManager; private bool _leftPanelAnimationsEnd; private bool _playerAvatarDialogsEnd; private bool _dropPanelBGAniamtionEnd; private AddFriendDialogContext _addFriendDialog; private bool _levelSuccess; private FriendDetailDataItem _friendDetailData; public Action onDestory; public LevelResultDialogContext(StageEndRsp rsp = null) { config = new ContextPattern { contextName = "LevelResultDialogContext", viewPrefabPath = "UI/Menus/Dialog/LevelResultDialog", cacheType = ViewCacheType.DontCache }; findViewSavedInScene = true; _stageEndRsp = rsp; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.PlayerLevelUp) { return OnPlayerLevelUpNotify(ntf); } if (ntf.type == NotifyTypes.AvatarLevelUp) { return OnAvatarLevelUpNotify(ntf); } return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("RewardPanel/OKBtn").GetComponent