September 2014
Beginner
266 pages
5h 38m
English
Similar to how we created the MainMenuScene, we will create OptionsMenuScene.h and OptionsMenuScene.cpp and include them in the Solution Explorer pane.
In the OptionsMenuScene.h file, add the following code:
#ifndef __wp8Game__OPTIONSMENU_SCENE__
#define __wp8Game__OPTIONSMENU_SCENE__
#include "cocos2d.h"
#include "ScrollingBgLayer.h"
using namespace cocos2d;
class OptionsMenu : public cocos2d::CCLayer
{
public:
virtual bool init();
ScrollingBgLayer* scrollingBgLayer;
static cocos2d::CCScene* scene();
void update(float dt);
void reset(CCObject* pSender);
void mainMenu(CCObject* pSender);
CREATE_FUNC(OptionsMenu);
};
#endifHere once again, we include ScrollingBgLayer.h, inherit from CCLayer, and add in the usual code, as ...
Read now
Unlock full access