using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class InLevelReviveDialogContext : BaseDialogContext { private const int UNLIMIT_REVIVE_TIMES = 65535; private LevelScoreManager _levelScoreManager; private List _dropItemList; public uint avatarRuntimeID; public Vector3 revivePosition; public bool allTeamDown; private MonoGridScroller _dropGridScroller; public InLevelReviveDialogContext(uint avatarRuntimeID, Vector3 revivePosition, bool allTeamDown = false) { config = new ContextPattern { contextName = "InLevelReviveDialogContext", viewPrefabPath = "UI/Menus/Dialog/InLevelReviveDialogV2" }; this.avatarRuntimeID = avatarRuntimeID; this.revivePosition = revivePosition; this.allTeamDown = allTeamDown; } public void RefreshView() { SetupView(); } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.AvatarSelectForRevive) { return OnAvatarSelectForRevive((uint)ntf.body); } return false; } protected override bool SetupView() { _levelScoreManager = Singleton.Instance; SetupCurrentGetItems(); InitTeam(); SetupReviveInfo(); SetupLayout(); return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("BG").GetComponent