2022-06-24 16:23:26 +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-10-01 16:24:52 +08:00
|
|
|
|
#include <Rendering/axmol/CubismOffscreenSurface_Cocos2dx.hpp>
|
2022-06-24 16:23:26 +08:00
|
|
|
|
|
|
|
|
|
class LAppView;
|
|
|
|
|
|
2022-10-18 19:17:36 +08:00
|
|
|
|
class SampleScene : public ax::Scene
|
2022-06-24 16:23:26 +08:00
|
|
|
|
{
|
|
|
|
|
public:
|
2022-10-18 19:17:36 +08:00
|
|
|
|
static ax::Scene* createScene();
|
2022-06-24 16:23:26 +08:00
|
|
|
|
|
|
|
|
|
static SampleScene* getInstance();
|
|
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
|
|
|
|
|
|
virtual void update(float delta) override;
|
|
|
|
|
|
|
|
|
|
virtual void onExit() override;
|
|
|
|
|
|
|
|
|
|
// a selector callback
|
2024-05-03 22:15:08 +08:00
|
|
|
|
void menuCloseCallback(ax::Object* pSender);
|
|
|
|
|
void menuChangeCallback(ax::Object* pSender);
|
2022-06-24 16:23:26 +08:00
|
|
|
|
|
|
|
|
|
// implement the "static create()" method manually
|
|
|
|
|
CREATE_FUNC(SampleScene);
|
|
|
|
|
|
|
|
|
|
// constructor
|
|
|
|
|
SampleScene();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
LAppView* _pView;
|
|
|
|
|
|
2022-10-18 19:17:36 +08:00
|
|
|
|
ax::MenuItemImage* _changeItem;
|
|
|
|
|
ax::MenuItemImage* _closeItem;
|
2022-06-24 16:23:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // __SAMPLE_SCENE_H__
|