五:Cocos2d-x 的 Director
更新:HHH   时间:2023-1-7


Director  采用单例设计模式,确保一个游戏只有一个导演。     

    CCDirector* pDirector  =  CCDiretor: sharedDirector();


Director实际上是在维护一个堆栈。

       

        runWithScene      //启动场景

        replceScene       //替换场景

        pushScene        // 堆栈方法

        popScene        // 堆栈方法

        pause             // 进入后台调用方法

        resume         //恢复方法


返回游戏开发教程...