2022-06-24 15:18:08 +08:00
|
|
|
|
/**
|
|
|
|
|
* Copyright(c) Live2D Inc. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by the Live2D Open Software license
|
|
|
|
|
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __SAMPLE_SCENE_H__
|
|
|
|
|
#define __SAMPLE_SCENE_H__
|
|
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2022-07-09 22:23:34 +08:00
|
|
|
|
#include <Rendering/axis/CubismOffscreenSurface_Cocos2dx.hpp>
|
2022-06-24 15:18:08 +08:00
|
|
|
|
|
|
|
|
|
class LAppView;
|
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
|
class SampleScene : public axis::Scene
|
2022-06-24 15:18:08 +08:00
|
|
|
|
{
|
|
|
|
|
public:
|
2022-07-11 17:50:21 +08:00
|
|
|
|
static axis::Scene* createScene();
|
2022-06-24 15:18:08 +08:00
|
|
|
|
|
|
|
|
|
static SampleScene* getInstance();
|
|
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
|
|
|
|
|
|
virtual void update(float delta) override;
|
|
|
|
|
|
|
|
|
|
virtual void onExit() override;
|
|
|
|
|
|
|
|
|
|
// a selector callback
|
2022-07-11 17:50:21 +08:00
|
|
|
|
void menuCloseCallback(axis::Ref* pSender);
|
|
|
|
|
void menuChangeCallback(axis::Ref* pSender);
|
2022-06-24 15:18:08 +08:00
|
|
|
|
|
|
|
|
|
// implement the "static create()" method manually
|
|
|
|
|
CREATE_FUNC(SampleScene);
|
|
|
|
|
|
|
|
|
|
// constructor
|
|
|
|
|
SampleScene();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
LAppView* _pView;
|
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
|
axis::MenuItemImage* _changeItem;
|
|
|
|
|
axis::MenuItemImage* _closeItem;
|
2022-06-24 15:18:08 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // __SAMPLE_SCENE_H__
|