/// <summary> /// Drag and drop the next lvl from assets /// </summary> private void OnMouseDown() { SfxManager.SingleInstance.PlaySound(clipMouseDown); if (!canPlayLvl) { return; } SceneManager.LoadScene(lvlToPlay); OnSceneLoadEvent.OnSceneLoad(); }
private void Awake() { if (_singleInstance == null) { _singleInstance = this; } else { Destroy(gameObject); } }
private void Awake() { OnSceneLoadEvent.AddNotifier(this); if (SingleInstance == null) { SingleInstance = this; } else { Destroy(gameObject); } }
private void OnDisable() { OnSceneLoadEvent.RemoveNotifier(this); }
private void OnEnable() { OnSceneLoadEvent.AddNotifier(this); }