/** * 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 _APP_DELEGATE_H_ #define _APP_DELEGATE_H_ #include "cocos2d.h" #include "LAppAllocator.hpp" #include // #define USE_AUDIO_ENGINE 1 // #define USE_SIMPLE_AUDIO_ENGINE 1 /** @brief The cocos2d Application. Private inheritance here hides part of interface from Director. */ class AppDelegate : private cocos2d::Application { public: AppDelegate(); virtual ~AppDelegate(); virtual void initGLContextAttrs(); /** @brief Implement Director and Scene init code here. @return true Initialize success, app continue. @return false Initialize failed, app terminate. */ virtual bool applicationDidFinishLaunching(); /** @brief Called when the application moves to the background @param the pointer of the application */ virtual void applicationDidEnterBackground(); /** @brief Called when the application reenters the foreground @param the pointer of the application */ virtual void applicationWillEnterForeground(); private: cocos2d::EventListenerCustom* _recreatedEventlistener; LAppAllocator _cubismAllocator; Csm::CubismFramework::Option _cubismOption; }; #endif // _APP_DELEGATE_H_