using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class MissionRewardGotDialogContext : BaseDialogContext { public delegate void OnDialogDestroy(AvatarCardDataItem data); private OnDialogDestroy _onDestroy; private AvatarCardDataItem _avatarData; private List _rewardDataList; private List _dropItemList; private SequenceAnimationManager _animationManager; private List _missionRewardList = new List(); public MissionRewardGotDialogContext(List rewardDataList, List dropList = null) { config = new ContextPattern { contextName = "MissionRewardGotDialogContext", viewPrefabPath = "UI/Menus/Dialog/MissionRewardGotDialog" }; _rewardDataList = rewardDataList; _dropItemList = dropList; _avatarData = null; } public void RegisterCallBack(OnDialogDestroy callback) { _onDestroy = callback; } protected override bool SetupView() { _animationManager = new SequenceAnimationManager(); ClearViews(); InitRewardList(); SetupContents(); _animationManager.AddAnimation(base.view.transform.Find("Dialog/Content/CompleteIcon").GetComponent()); _animationManager.StartPlay(0.5f, false); return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("BG").GetComponent