private void OnDestroy() { if (this == sInstance) { sInstance = null; } }
private void Start() { StartCoroutine(SetupBuyableMenuPanels()); gameMenuPanelManager = GameMenuPanelManager.instance; ScorePanel = ScorePanelManager.Instance; ClosePanels(); }
void Awake() { if (sInstance == null) { sInstance = this; Setup(); } else if (sInstance != this) { Destroy(this.gameObject); return; } }
//--------------------------------------------------------------------------------------------- public static void EnableScoreBoard(bool _Enable, GameObject _ScorePanel) { _ScorePanel.SetActive(_Enable); if (_Enable) { ScorePanelManager _scorePanel = _ScorePanel.GetComponent <ScorePanelManager>(); if (_scorePanel != null) { _scorePanel.CreateScores(); } } }
private void Awake() { instance = this; }