Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17081

How to change the scene?

$
0
0

I have two scripts. One for the main menu, and one for the intro. I am trying to use

auto mainmenu = MainMenu::createScene();
Director::getInstance()->replaceScene(mainmenu);

I am using #include "MainMenuScene.h"
MainMenuScene.h:

#ifndef __MENU_SCENE_H__
#define __MENU_SCENE_H__

#include "cocos2d.h"

class MainMenu : public cocos2d::Scene
{
public:
    static cocos2d::Scene* createScene();

    virtual bool init();
    
    void menuCloseCallback(cocos2d::Ref* pSender);
 
    CREATE_FUNC(MainMenu);
};

#endif

7 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 17081

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>