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 { ...@@ -34,6 +34,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
onLoadEnd() { onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考 // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.log('onLoadEnd');
this.initData(); this.initData();
this.initView(); this.initView();
this.initListener(); this.initListener();
......
...@@ -141,11 +141,11 @@ export class NetworkHelper { ...@@ -141,11 +141,11 @@ export class NetworkHelper {
this.room.matchRoom(matchRoomPara, async (event) => { this.room.matchRoom(matchRoomPara, async (event) => {
// console.log(JSON.stringify(event)) // console.log(JSON.stringify(event))
if (event.code !== 0) { if (event.code !== 0) {
cc.log("匹配失败"); this.log("匹配失败");
reject(event); reject(event);
return; return;
} }
cc.log("匹配成功: " + event.data.roomInfo.id); this.log("匹配成功: " + event.data.roomInfo.id);
const player = event.data.roomInfo.playerList.find( const player = event.data.roomInfo.playerList.find(
(player) => player.name == playerName (player) => player.name == playerName
); );
...@@ -153,7 +153,7 @@ export class NetworkHelper { ...@@ -153,7 +153,7 @@ export class NetworkHelper {
if (this._eventListeners["playerOffLine"]) { if (this._eventListeners["playerOffLine"]) {
this._eventListeners["playerOffLine"](event); this._eventListeners["playerOffLine"](event);
} }
cc.log("房主掉线了"); this.log("房主掉线了");
resolve(null); resolve(null);
return; return;
} }
...@@ -292,7 +292,7 @@ export class NetworkHelper { ...@@ -292,7 +292,7 @@ export class NetworkHelper {
if (this._eventListeners["playerOffLine"]) { if (this._eventListeners["playerOffLine"]) {
this._eventListeners["playerOffLine"](event); 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