using System; using Excel2Json; using Fort23.Core; using Fort23.Mono; using Fort23.UTool; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class ULockWidget : MonoBehaviour, IPointerClickHandler { private int uLockId; public int uLockFunction; public Action ulockCallBack; private UnlockConfig _config; private bool _currULock; private Button mUIButton; private bool mIsUnlock; private void Awake() { if (uLockFunction == 0) return; StartULock(); if (mUIButton == null) return; } public void SetuLockFunction(int id) { uLockFunction = id; if (uLockFunction == 0) { mIsUnlock = true; UnlockShow(mIsUnlock); return; } StartULock(); if (mUIButton == null) return; } public void StartULock() { if (uLockId <= 0) { _config = ULockManager.Instance.GetULockConfig(uLockFunction); } else { _config = ULockManager.Instance.GetULockConfig(uLockId, false); } mUIButton = transform.GetComponentInChildren