using MoleMole.Config; using UnityEngine; using UnityEngine.UI; namespace MoleMole { public class AvatarUnlockDialogContext : BaseSequenceDialogContext { private const float TIMER_SPAN = 1f; private int _avatarID; private AvatarDataItem _avatarData; private bool _enableClipZone; private CanvasTimer _timer; private SequenceAnimationManager _animationManager; public AvatarUnlockDialogContext(int avatarID, bool enableClipZone = false) { config = new ContextPattern { contextName = "AvatarUnlockDialogContext", viewPrefabPath = "UI/Menus/Dialog/AvatarUnlockDialog", cacheType = ViewCacheType.DontCache }; _avatarID = avatarID; _avatarData = Singleton.Instance.GetAvatarByID(_avatarID); _enableClipZone = enableClipZone; _timer = Singleton.Instance.SceneCanvas.CreateTimer(1f, 0f); _timer.timeUpCallback = OnBGClick; _timer.StopRun(); } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("ClipZone").GetComponent