using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; namespace MoleMole { public class PlayerLevelUpDialogContext : BaseSequenceDialogContext { private const string NEW_FEATURE_PREFAB_PATH = "UI/Menus/Widget/Map/NewFeature"; private const float TIMER_SPAN = 2f; private SequenceAnimationManager _animationManager; private CanvasTimer _timer; private int _levelBefore_no_scoremanager; private AvatarCardDataItem _avatarData; public PlayerLevelUpDialogContext() { config = new ContextPattern { contextName = "PlayerLevelUpDialogContext", viewPrefabPath = "UI/Menus/Dialog/PlayerLevelUpDialog" }; if (_timer != null) { _timer.Destroy(); } _timer = Singleton.Instance.SceneCanvas.CreateTimer(2f, 0f); _timer.timeUpCallback = OnBGClick; _timer.StopRun(); _avatarData = null; } public void SetLevelBeforeNoScoreManager(int level) { _levelBefore_no_scoremanager = level; } public void SetNotifyWhenDestroy(AvatarCardDataItem avatarData) { _avatarData = avatarData; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("Btn").GetComponent