Exemplo n.º 1
0
    /// <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();
    }
Exemplo n.º 2
0
 private void Awake()
 {
     if (_singleInstance == null)
     {
         _singleInstance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 3
0
 private void Awake()
 {
     OnSceneLoadEvent.AddNotifier(this);
     if (SingleInstance == null)
     {
         SingleInstance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 4
0
 private void OnDisable()
 {
     OnSceneLoadEvent.RemoveNotifier(this);
 }
Exemplo n.º 5
0
 private void OnEnable()
 {
     OnSceneLoadEvent.AddNotifier(this);
 }