Pomelo​ 的 Cocos2d-js 客户端 pomelo-cocos2d-js

码农软件 · 软件分类 · 手机游戏 · 2019-05-14 18:41:32

软件介绍

pomelo-cocos2d-js 是 Pomelo 的 Cocos2d-js 客户端。

var pomelo = window.pomelo;
var route = 'gate.gateHandler.queryEntry';
var uid = "uid";
var rid = "rid";
var username = "username";
pomelo.init({
    host: "127.0.0.1",
    port: 3014,
    log: true
}, function() {
    pomelo.request(route, {
        uid: uid
    }, function(data) {
        pomelo.disconnect();
        pomelo.init({
            host: data.host,
            port: data.port,
            log: true
        }, function() {
            var route = "connector.entryHandler.enter";
            pomelo.request(route, {
                username: username,
                rid: rid
            }, function(data) {
                cc.log(JSON.stringify(data));
                chatSend();
            });
        });
    });
});
function chatSend() {
    var route = "chat.chatHandler.send";
    var target = "*";
    var msg = "msg"
    pomelo.request(route, {
        rid: rid,
        content: msg,
        from: username,
        target: target
    }, function(data) {
        cc.log(JSON.stringify(data));
    });
}

本文地址:https://www.codercto.com/soft/d/5743.html

自媒体之道

自媒体之道

吴晨光 / 中国人民大学出版社有限公司 / 2018-7-31 / CNY 49.80

内容简介: 《自媒体之道》为你解决四个问题: 1. 一篇10万+的刷屏文章是怎么写出来的? 2. 一支10万+的爆款视频是怎么做出来的? 3. 一个100万+粉丝的大号是怎么运营的? 4. 神秘的人工智能(AI)和备受争议的算法是怎么运行的? 这部超过30万字的著作,集纳了中国顶尖自媒体人和平台运营者3年的实操经验。全书13章,详解案例150+,提炼“锦囊秒句”......一起来看看 《自媒体之道》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具