Commit 4377498d authored by 范雪寒's avatar 范雪寒

test: log

parent ae582a97
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -34,6 +34,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.log('onLoadEnd');
this.initData();
this.initView();
this.initListener();
......
......@@ -141,11 +141,11 @@ export class NetworkHelper {
this.room.matchRoom(matchRoomPara, async (event) => {
// console.log(JSON.stringify(event))
if (event.code !== 0) {
cc.log("匹配失败");
this.log("匹配失败");
reject(event);
return;
}
cc.log("匹配成功: " + event.data.roomInfo.id);
this.log("匹配成功: " + event.data.roomInfo.id);
const player = event.data.roomInfo.playerList.find(
(player) => player.name == playerName
);
......@@ -153,7 +153,7 @@ export class NetworkHelper {
if (this._eventListeners["playerOffLine"]) {
this._eventListeners["playerOffLine"](event);
}
cc.log("房主掉线了");
this.log("房主掉线了");
resolve(null);
return;
}
......@@ -292,7 +292,7 @@ export class NetworkHelper {
if (this._eventListeners["playerOffLine"]) {
this._eventListeners["playerOffLine"](event);
}
cc.log("房主掉线了");
this.log("房主掉线了");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment