资源简介
Cocos Creator 实现protobuf与后台通信源代码,使用websocket自定义消息格式,对第一次使用cocos creator实现protobuf有参考价值,项目只有一个登陆的demo用于测试protobuf与后台通信
代码片段和文件信息
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co. Ltd.
http://www.cocos.com
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated engine source code (the “Software“) a limited
worldwide royalty-free non-assignable revocable and non-exclusive license
to use Cocos Creator solely to develop games on your target platforms. You shall
not use Cocos Creator software for developing other software or tools that‘s
used for developing games. You are not granted to publish distribute
sublicense and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed not sold.
Xiamen Yaji Software Co. Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include “AppDelegate.h“
#include “cocos2d.h“
#include “cocos/scripting/js-bindings/manual/jsb_module_register.hpp“
#include “cocos/scripting/js-bindings/manual/jsb_global.h“
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h“
#include “cocos/scripting/js-bindings/event/EventDispatcher.h“
#include “cocos/scripting/js-bindings/manual/jsb_classtype.hpp“
USING_NS_CC;
AppDelegate::AppDelegate(int width int height) : Application(“Cocos Game“ width height)
{
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching()
{
se::scriptEngine *se = se::scriptEngine::getInstance();
jsb_set_xxtea_key(“64841e71-94d9-4c“);
jsb_init_file_operation_delegate();
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
// Enable debugger here
jsb_enable_debugger(“0.0.0.0“ 6086 false);
#endif
se->setExceptionCallback([](const char *location const char *message const char *stack) {
// Send exception information to server like Tencent Bugly.
});
jsb_register_all_modules();
se->start();
se::AutoHandleScope hs;
jsb_run_script(“jsb-adapter/jsb-builtin.js“);
jsb_run_script(“main.js“);
se->addAfterCleanupHook([]() {
JSBClassType::destroy();
});
return true;
}
// This function will be called when the app is inactive. When comes a phone callit‘s be invoked too
void AppDelegate::applicationDidEnterBackground()
{
EventDispatcher::dispatchEnterBackgroundEvent();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeg
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-11-12 16:19 typesc
目录 0 2019-11-12 16:03 typesc
文件 63 2019-11-28 10:20 typesc
文件 697 2019-11-28 10:20 typesc
文件 177 2019-11-12 16:01 typesc
文件 1015 2019-11-13 11:39 typesc
文件 266 2019-11-12 16:02 typesc
文件 899959 2019-11-12 16:02 typesc
目录 0 2019-11-28 10:20 typesc
目录 0 2019-11-12 16:01 typesc
目录 0 2019-11-12 16:01 typesc
文件 19773 2019-11-14 11:08 typesc
文件 161028 2019-11-14 11:08 typesc
目录 0 2019-11-28 10:20 typesc
目录 0 2019-11-28 10:20 typesc
目录 0 2019-11-28 10:20 typesc
目录 0 2019-11-28 10:20 typesc
文件 1519 2019-11-28 10:20 typesc
文件 1213 2019-11-28 10:20 typesc
目录 0 2019-11-28 10:20 typesc
文件 8742 2019-11-28 10:20 typesc
文件 2025 2019-11-28 10:20 typesc
文件 848 2019-11-28 10:20 typesc
文件 10335 2019-11-28 10:20 typesc
文件 6266 2019-11-28 10:20 typesc
文件 5770 2019-11-28 10:20 typesc
目录 0 2019-11-28 10:20 typesc
文件 883 2019-11-28 10:20 typesc
文件 3529 2019-11-28 10:20 typesc
文件 794 2019-11-28 10:20 typesc
文件 18400 2019-11-28 10:20 typesc
............此处省略894个文件信息
- 上一篇:京津冀城市群乡镇以上路网
- 下一篇:GTK+修复工具64位.rar
相关资源
- 消除游戏源码商用
- ddos资源 源代码!
- jdk1.8.0_121源码
- 严慧敏数据结构高清版及源码
- 千图千库等12网素材解析源码程序
- 最新版微盘微交易时间盘源码期货股
- 一个unity的完整项目_拾荒者
- 基于51单片机的1-40Mhz正弦波发生器仿
- cocos creator 6个小游戏合集
- jdk1.8.0_144的源码包
- Qt5 GUI programming书 和源码
- 传智播客IOS开发零基础教程源代码和
- 复刻球球大作战战斗功能-cocos-lua开发
- unix环境高级编程第三版+源码
- net仿京东大型商城源码
- unity底层源码.rar
- 基于Zigbee技术的智能家居源码
- 带手机版数据同步高端网站建设网络
- 骑士周游算法的QT演示版
- 配置静态ip程序源码
- 功能相当完善的记事本app
- 太原科大天气APP毕业设计
- 欢乐麻将游戏源码.rar
- 完整的资讯类项目框架
- 安卓remusic仿网易音乐播放器源代码
- EasyUI管理后台模板()easyui_demo
- VB6.0版机房管理系统源码(附数据库)
- 大量OPC的客户端,各种OPC的客户端
- 易语言:DNF全自动图源码
- 微信移动商城系统源码
评论
共有 条评论