issue #2103 add webSocket lua test sample

This commit is contained in:
samuele3hu 2013-06-07 13:55:36 +08:00
parent f58d0a04aa
commit cdbf8b7250
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,9 @@
#include "CCLuaEngine.h"
#include "SimpleAudioEngine.h"
#include "Lua_extensions_CCB.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include "Lua_web_socket.h"
#endif
using namespace CocosDenshion;
@ -38,10 +40,11 @@ bool AppDelegate::applicationDidFinishLaunching()
CCLuaStack *pStack = pEngine->getLuaStack();
lua_State *tolua_s = pStack->getLuaState();
tolua_extensions_ccb_open(tolua_s);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
pStack = pEngine->getLuaStack();
tolua_s = pStack->getLuaState();
tolua_web_socket_open(tolua_s);
#endif
std::vector<std::string> searchPaths;
searchPaths.push_back("cocosbuilderRes");