Пример #1
0
 public static void Destroy()
 {
     if (_instance != null)
     {
         GameObject.DestroyImmediate(_instance.gameObject);
     }
     _instance = null;
 }
Пример #2
0
    private void PenddingBind()
    {
        if (!isBindPendding || !isWarmed)
        {
            return;
        }

        isBindPendding = false;
        RedPointManager.BindPointItem(this.gameObject, key);
        this.gameObject.SetActive(RedPointManager.INSTANCE.GetPointResult(key));
    }
Пример #3
0
    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;
    }
Пример #4
0
 private void Awake()
 {
     _instance = this;
     GameObject.DontDestroyOnLoad(this);
 }
Пример #5
0
 private void OnDestroy()
 {
     RedPointManager.UnbindPointItem(this);
 }