mirror of
https://github.com/u0u0/Cocos2d-Lua-Community.git
synced 2026-05-30 04:31:03 +08:00
不直接使用getContents,调整加密做准备。
This commit is contained in:
@@ -27,13 +27,6 @@
|
||||
#include "cocos2d.h"
|
||||
#include "scripting/lua-bindings/manual/lua_module_register.h"
|
||||
|
||||
// #define USE_AUDIO_ENGINE 1
|
||||
|
||||
#if USE_AUDIO_ENGINE
|
||||
#include "audio/include/AudioEngine.h"
|
||||
using namespace cocos2d::experimental;
|
||||
#endif
|
||||
|
||||
USING_NS_CC;
|
||||
using namespace std;
|
||||
|
||||
@@ -43,15 +36,6 @@ AppDelegate::AppDelegate()
|
||||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
#if USE_AUDIO_ENGINE
|
||||
AudioEngine::end();
|
||||
#endif
|
||||
|
||||
#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
|
||||
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
|
||||
RuntimeEngine::getInstance()->end();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// if you want a different context, modify the value of glContextAttrs
|
||||
@@ -84,9 +68,6 @@ bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
||||
register_all_packages();
|
||||
|
||||
LuaStack* stack = engine->getLuaStack();
|
||||
stack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));
|
||||
|
||||
//register custom function
|
||||
//LuaStack* stack = engine->getLuaStack();
|
||||
//register_custom_function(stack->getLuaState());
|
||||
@@ -108,18 +89,10 @@ bool AppDelegate::applicationDidFinishLaunching()
|
||||
void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
Director::getInstance()->stopAnimation();
|
||||
|
||||
#if USE_AUDIO_ENGINE
|
||||
AudioEngine::pauseAll();
|
||||
#endif
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
Director::getInstance()->startAnimation();
|
||||
|
||||
#if USE_AUDIO_ENGINE
|
||||
AudioEngine::resumeAll();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user