예제 #1
0
    void OnLevelWasLoaded(int level)
    {
        if (nullify)
        {
            return;
        }

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

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