Esempio n. 1
0
    void OnLevelWasLoaded(int level)
    {
        if (nullify)
        {
            return;
        }

        //give it a singelton style
        if (instance == null)
        {
            instance = this;//
            nullify  = true;
            Initialize();
        }
    }
Esempio n. 2
0
    public void Awake()
    {
        if (nullify)
        {
            return;
        }

        //give it a singelton style
        if (instance == null)
        {
            instance = this;           //
            nullify  = true;
            Initialize();
        }
    }