Example #1
0
    virtual public void init()
    {
        //Debug.Log("baseState init()");
        if (CTransitionManager.Inst.IsScreenCovered() == true)
        {
            CTransitionManager.Inst.SetFadeOutFlag();
        }

        if (!CAudioManager.Inst.isMusicPlaying(_musica))
        {
            CAudioManager.Inst.startMusic(_musica, _loopMusic);
        }

        mGrid = FindObjectOfType <CGrid>();

        if (mGrid != null)
        {
            mGrid.init();
        }
        else
        {
            Debug.Log("grid null!");
        }
    }