public static void Destroy() { if (_instance != null) { GameObject.DestroyImmediate(_instance.gameObject); } _instance = null; }
private void PenddingBind() { if (!isBindPendding || !isWarmed) { return; } isBindPendding = false; RedPointManager.BindPointItem(this.gameObject, key); this.gameObject.SetActive(RedPointManager.INSTANCE.GetPointResult(key)); }
private void OnDestroy() { foreach (var key in _redPointDataMap.Keys) { _redPointDataMap[key].checkActiveFunc = null; } _redPointDataMap.Clear(); foreach (var key in _redPointItemMap.Keys) { _redPointItemMap[key].Clear(); } _redPointItemMap.Clear(); _instance = null; }
private void Awake() { _instance = this; GameObject.DontDestroyOnLoad(this); }
private void OnDestroy() { RedPointManager.UnbindPointItem(this); }