axmol/tests/live2d-tests/Source/SampleScene.h

47 lines
1.0 KiB
C
Raw Normal View History

/**
* 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>
class LAppView;
2022-10-18 19:17:36 +08:00
class SampleScene : public ax::Scene
{
public:
2022-10-18 19:17:36 +08:00
static ax::Scene* createScene();
static SampleScene* getInstance();
virtual bool init() override;
virtual void update(float delta) override;
virtual void onExit() override;
// a selector callback
void menuCloseCallback(ax::Object* pSender);
void menuChangeCallback(ax::Object* pSender);
// 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;
};
#endif // __SAMPLE_SCENE_H__