Commit f696c7af authored by liujiangnan's avatar liujiangnan

debug

parent ad009a90
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// import { getSprNode } from "./util"; // import { getSprNode } from "./util";
import { getSprNode, playAudioByUrl, showBtnAnima, getScaleRateBy2Node, localPosTolocalPos, randomSortByArr, loadDragonBones, playAudio, showTrebleFirework, getSprNodeByUrl, setSprNodeMaxLen, delayCall, asyncDelay, RandomInt, exchangeNodePos, onHomeworkFinish, callNetworkApi, loopLog, removeFromArr} from "../script/hw_elimination_letter_util"; import { getSprNode, playAudioByUrl, showBtnAnima, getScaleRateBy2Node, localPosTolocalPos, randomSortByArr, loadDragonBones, playAudio, showTrebleFirework, getSprNodeByUrl, setSprNodeMaxLen, delayCall, asyncDelay, RandomInt, exchangeNodePos, onHomeworkFinish, callNetworkApi, loopLog, removeFromArr} from "../script/hw_elimination_letter_util";
import { asyncCallNetworkApiGet, getLiveUserInfo, getRoomId, drawOpenNickName } from "../script/supportToolsDy"; import { asyncCallNetworkApiGet, asyncCallNetworkApiPost, getLiveUserInfo, getRoomId, drawOpenNickName } from "../script/supportToolsDy";
cc.Class({ cc.Class({
...@@ -86,19 +86,20 @@ cc.Class({ ...@@ -86,19 +86,20 @@ cc.Class({
async start() { async start() {
// anchor - 主播,audience - 观众 // anchor - 主播
// audience - 观众
this.roomId = await getRoomId(); this.roomId = await getRoomId();
const res = await getLiveUserInfo(); const res = await getLiveUserInfo();
this.role = res.role; this.role = res.role;
this.uid = res.uid; this.uid = res.uid;
// 测试数据 // 测试数据
this.role = 'anchor'; // this.role = 'audience';
this.uid = 'teacher'; // this.uid = 'student';
const nickObj = await drawOpenNickName(res.nickName); const nickObj = await drawOpenNickName(res.nickName);
await asyncCallNetworkApiGet('/api/douyin/v1/create', {roomid: this.roomId, uid: this.uid, nickname: JSON.stringify(nickObj), role: this.role}); await asyncCallNetworkApiPost('/api/douyin/v1/create', {roomid: this.roomId, uid: this.uid, nickname: nickObj.data, role: this.role});
if (this.role == 'anchor') { if (this.role == 'anchor') {
// 主播 // 主播
cc.director.loadScene('wordgame_syllabus'); cc.director.loadScene('wordgame_syllabus');
...@@ -106,7 +107,6 @@ cc.Class({ ...@@ -106,7 +107,6 @@ cc.Class({
cc.find(`Canvas/ready`).active = true; cc.find(`Canvas/ready`).active = true;
this.heartGameStatus(); this.heartGameStatus();
} }
}, },
isGameStart: null, isGameStart: null,
......
...@@ -29,6 +29,20 @@ export function callNetworkApiGet(uri, data, callBack) { ...@@ -29,6 +29,20 @@ export function callNetworkApiGet(uri, data, callBack) {
xhr.send(); xhr.send();
} }
export function callNetworkApiPost(uri, data, callBack) {
const xhr = new XMLHttpRequest();
const url = `${openApi}${uri}`;
xhr.open("POST", url, true);
xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
callBack(JSON.parse(xhr.responseText));
}
}
xhr.send(JSON.stringify(data));
}
export async function asyncCallNetworkApiGet(apiName, data) { export async function asyncCallNetworkApiGet(apiName, data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
callNetworkApiGet(apiName, data, (res => { callNetworkApiGet(apiName, data, (res => {
...@@ -37,6 +51,14 @@ export async function asyncCallNetworkApiGet(apiName, data) { ...@@ -37,6 +51,14 @@ export async function asyncCallNetworkApiGet(apiName, data) {
}); });
} }
export async function asyncCallNetworkApiPost(uri, data) {
return new Promise((resolve, reject) => {
callNetworkApiPost(uri, data, (res) => {
resolve(res);
});
});
}
function getConSig(){ function getConSig(){
...@@ -138,7 +160,7 @@ function getWebRecordInstanse() { ...@@ -138,7 +160,7 @@ function getWebRecordInstanse() {
} }
export function getRoomId() { export function getRoomId() {
if (cc.sys.platform !== cc.sys.BYTEDANCE_GAME) { if (cc.sys.platform !== 117) {
return 'test-room-0001'; return 'test-room-0001';
} }
return new Promise((resolve) => { return new Promise((resolve) => {
...@@ -155,7 +177,7 @@ export function getRoomId() { ...@@ -155,7 +177,7 @@ export function getRoomId() {
} }
export function drawOpenNickName(str) { export function drawOpenNickName(str) {
if (cc.sys.platform !== cc.sys.BYTEDANCE_GAME) { if (cc.sys.platform !== 117) {
return {}; return {};
} }
return new Promise((resolve) => { return new Promise((resolve) => {
...@@ -171,7 +193,7 @@ export function drawOpenNickName(str) { ...@@ -171,7 +193,7 @@ export function drawOpenNickName(str) {
} }
export function getLiveUserInfo() { export function getLiveUserInfo() {
if (cc.sys.platform !== cc.sys.BYTEDANCE_GAME) { if (cc.sys.platform !== 117) {
return { return {
role: 'audience', role: 'audience',
uid: 'example', uid: 'example',
......
...@@ -81,28 +81,28 @@ ...@@ -81,28 +81,28 @@
"__id__": 11 "__id__": 11
}, },
{ {
"__id__": 33 "__id__": 36
}, },
{ {
"__id__": 50 "__id__": 53
}, },
{ {
"__id__": 55 "__id__": 58
}, },
{ {
"__id__": 93 "__id__": 96
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 100 "__id__": 103
}, },
{ {
"__id__": 101 "__id__": 104
}, },
{ {
"__id__": 102 "__id__": 105
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -509,18 +509,21 @@ ...@@ -509,18 +509,21 @@
"_children": [ "_children": [
{ {
"__id__": 12 "__id__": 12
},
{
"__id__": 15
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 30 "__id__": 33
}, },
{ {
"__id__": 31 "__id__": 34
}, },
{ {
"__id__": 32 "__id__": 35
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -571,6 +574,131 @@ ...@@ -571,6 +574,131 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "8adWzWYoVC6LLGnHfYUzRN" "_id": "8adWzWYoVC6LLGnHfYUzRN"
}, },
{
"__type__": "cc.Node",
"_name": "debug",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-31.736,
376.86,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e9fHMacLFBx4/WXTLdsN/P"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "ea/odK+NFHoocKaBdT5SId"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 137.94,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "29zLq9fKJIj7GFz0GC8rNm"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "view", "_name": "view",
...@@ -580,16 +708,16 @@ ...@@ -580,16 +708,16 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 13 "__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 28 "__id__": 31
}, },
{ {
"__id__": 29 "__id__": 32
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -604,7 +732,7 @@ ...@@ -604,7 +732,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1280, "width": 1280,
"height": 960 "height": 600
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -645,20 +773,20 @@ ...@@ -645,20 +773,20 @@
"_name": "content", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 12 "__id__": 15
}, },
"_children": [ "_children": [
{ {
"__id__": 14 "__id__": 17
}, },
{ {
"__id__": 15 "__id__": 18
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 27 "__id__": 30
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -714,7 +842,7 @@ ...@@ -714,7 +842,7 @@
"_name": "New Node", "_name": "New Node",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 13 "__id__": 16
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -772,17 +900,17 @@ ...@@ -772,17 +900,17 @@
"_name": "item", "_name": "item",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 13 "__id__": 16
}, },
"_children": [ "_children": [
{ {
"__id__": 16 "__id__": 19
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 28
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -838,23 +966,23 @@ ...@@ -838,23 +966,23 @@
"_name": "syllabus_item", "_name": "syllabus_item",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 15 "__id__": 18
}, },
"_children": [ "_children": [
{ {
"__id__": 17 "__id__": 20
}, },
{ {
"__id__": 19 "__id__": 22
}, },
{ {
"__id__": 21 "__id__": 24
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 24 "__id__": 27
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -910,13 +1038,13 @@ ...@@ -910,13 +1038,13 @@
"_name": "sure", "_name": "sure",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 16 "__id__": 19
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 18 "__id__": 21
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -972,7 +1100,7 @@ ...@@ -972,7 +1100,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 17 "__id__": 20
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1004,13 +1132,13 @@ ...@@ -1004,13 +1132,13 @@
"_name": "label", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 16 "__id__": 19
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 20 "__id__": 23
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1066,7 +1194,7 @@ ...@@ -1066,7 +1194,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1101,16 +1229,16 @@ ...@@ -1101,16 +1229,16 @@
"_name": "label_disable", "_name": "label_disable",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 16 "__id__": 19
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 22 "__id__": 25
}, },
{ {
"__id__": 23 "__id__": 26
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1166,7 +1294,7 @@ ...@@ -1166,7 +1294,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 21 "__id__": 24
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1201,7 +1329,7 @@ ...@@ -1201,7 +1329,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 21 "__id__": 24
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
...@@ -1219,7 +1347,7 @@ ...@@ -1219,7 +1347,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 16 "__id__": 19
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1251,7 +1379,7 @@ ...@@ -1251,7 +1379,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 18
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1260,7 +1388,7 @@ ...@@ -1260,7 +1388,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 26 "__id__": 29
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1316,7 +1444,7 @@ ...@@ -1316,7 +1444,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 15 "__id__": 18
}, },
"_id": "0a0L8lKTFNLbn0gHhFnY6E" "_id": "0a0L8lKTFNLbn0gHhFnY6E"
}, },
...@@ -1335,7 +1463,7 @@ ...@@ -1335,7 +1463,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 13 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1367,7 +1495,7 @@ ...@@ -1367,7 +1495,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 15
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1387,7 +1515,7 @@ ...@@ -1387,7 +1515,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 12 "__id__": 15
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -1395,8 +1523,8 @@ ...@@ -1395,8 +1523,8 @@
"_alignFlags": 5, "_alignFlags": 5,
"_left": 0, "_left": 0,
"_right": 0, "_right": 0,
"_top": 60, "_top": 240,
"_bottom": 60, "_bottom": 240,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -1456,10 +1584,10 @@ ...@@ -1456,10 +1584,10 @@
"scrollEvents": [], "scrollEvents": [],
"cancelInnerEvents": true, "cancelInnerEvents": true,
"_N$content": { "_N$content": {
"__id__": 13 "__id__": 16
}, },
"content": { "content": {
"__id__": 13 "__id__": 16
}, },
"_N$horizontalScrollBar": null, "_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null, "_N$verticalScrollBar": null,
...@@ -1501,19 +1629,19 @@ ...@@ -1501,19 +1629,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 34 "__id__": 37
}, },
{ {
"__id__": 39 "__id__": 42
}, },
{ {
"__id__": 44 "__id__": 47
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 52
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1539,8 +1667,8 @@ ...@@ -1539,8 +1667,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
320, 216.86,
-469.432, -370.259,
0, 0,
0, 0,
0, 0,
...@@ -1569,19 +1697,19 @@ ...@@ -1569,19 +1697,19 @@
"_name": "fanhui", "_name": "fanhui",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 36
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 35 "__id__": 38
}, },
{ {
"__id__": 36 "__id__": 39
}, },
{ {
"__id__": 38 "__id__": 41
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1637,7 +1765,7 @@ ...@@ -1637,7 +1765,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1669,7 +1797,7 @@ ...@@ -1669,7 +1797,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1678,7 +1806,7 @@ ...@@ -1678,7 +1806,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 37 "__id__": 40
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1734,7 +1862,7 @@ ...@@ -1734,7 +1862,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 34 "__id__": 37
}, },
"_id": "bcnsaQCyJC166VY3iFAVEn" "_id": "bcnsaQCyJC166VY3iFAVEn"
}, },
...@@ -1753,7 +1881,7 @@ ...@@ -1753,7 +1881,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 34 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -1780,19 +1908,19 @@ ...@@ -1780,19 +1908,19 @@
"_name": "shouye", "_name": "shouye",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 36
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 40 "__id__": 43
}, },
{ {
"__id__": 41 "__id__": 44
}, },
{ {
"__id__": 43 "__id__": 46
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1848,7 +1976,7 @@ ...@@ -1848,7 +1976,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 42
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1880,7 +2008,7 @@ ...@@ -1880,7 +2008,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 42
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1889,7 +2017,7 @@ ...@@ -1889,7 +2017,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 42 "__id__": 45
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1945,7 +2073,7 @@ ...@@ -1945,7 +2073,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 39 "__id__": 42
}, },
"_id": "77ST8KT/5NbZ6S9DjMcK8b" "_id": "77ST8KT/5NbZ6S9DjMcK8b"
}, },
...@@ -1964,7 +2092,7 @@ ...@@ -1964,7 +2092,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 39 "__id__": 42
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -1991,19 +2119,19 @@ ...@@ -1991,19 +2119,19 @@
"_name": "choice_full", "_name": "choice_full",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 36
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 45 "__id__": 48
}, },
{ {
"__id__": 46 "__id__": 49
}, },
{ {
"__id__": 48 "__id__": 51
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2059,7 +2187,7 @@ ...@@ -2059,7 +2187,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 47
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2091,7 +2219,7 @@ ...@@ -2091,7 +2219,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 47
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -2100,7 +2228,7 @@ ...@@ -2100,7 +2228,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 47 "__id__": 50
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -2156,7 +2284,7 @@ ...@@ -2156,7 +2284,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 44 "__id__": 47
}, },
"_id": "ffbW3dmWxDfrA6p2JreXkT" "_id": "ffbW3dmWxDfrA6p2JreXkT"
}, },
...@@ -2175,7 +2303,7 @@ ...@@ -2175,7 +2303,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 44 "__id__": 47
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2202,16 +2330,16 @@ ...@@ -2202,16 +2330,16 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 33 "__id__": 36
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 36, "_alignFlags": 36,
"_left": 0, "_left": 0,
"_right": 640, "_right": 743.14,
"_top": 0, "_top": 0,
"_bottom": 70.56799999999998, "_bottom": 169.74099999999999,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -2235,13 +2363,13 @@ ...@@ -2235,13 +2363,13 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 51 "__id__": 54
}, },
{ {
"__id__": 52 "__id__": 55
}, },
{ {
"__id__": 53 "__id__": 56
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2297,7 +2425,7 @@ ...@@ -2297,7 +2425,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 50 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2329,7 +2457,7 @@ ...@@ -2329,7 +2457,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 50 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -2356,7 +2484,7 @@ ...@@ -2356,7 +2484,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 50 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -2365,7 +2493,7 @@ ...@@ -2365,7 +2493,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 54 "__id__": 57
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -2421,7 +2549,7 @@ ...@@ -2421,7 +2549,7 @@
"hoverSprite": null, "hoverSprite": null,
"_N$disabledSprite": null, "_N$disabledSprite": null,
"_N$target": { "_N$target": {
"__id__": 50 "__id__": 53
}, },
"_id": "14WaHmnklEq6EeO/SeVhgl" "_id": "14WaHmnklEq6EeO/SeVhgl"
}, },
...@@ -2444,25 +2572,25 @@ ...@@ -2444,25 +2572,25 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 56 "__id__": 59
}, },
{ {
"__id__": 78 "__id__": 81
}, },
{ {
"__id__": 84 "__id__": 87
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 90 "__id__": 93
}, },
{ {
"__id__": 91 "__id__": 94
}, },
{ {
"__id__": 92 "__id__": 95
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2518,17 +2646,17 @@ ...@@ -2518,17 +2646,17 @@
"_name": "bg", "_name": "bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 58
}, },
"_children": [ "_children": [
{ {
"__id__": 57 "__id__": 60
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 77 "__id__": 80
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2584,20 +2712,20 @@ ...@@ -2584,20 +2712,20 @@
"_name": "ranklist", "_name": "ranklist",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 56 "__id__": 59
}, },
"_children": [ "_children": [
{ {
"__id__": 58 "__id__": 61
}, },
{ {
"__id__": 66 "__id__": 69
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 76 "__id__": 79
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2653,17 +2781,17 @@ ...@@ -2653,17 +2781,17 @@
"_name": "item", "_name": "item",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 57 "__id__": 60
}, },
"_children": [ "_children": [
{ {
"__id__": 59 "__id__": 62
}, },
{ {
"__id__": 61 "__id__": 64
}, },
{ {
"__id__": 63 "__id__": 66
} }
], ],
"_active": false, "_active": false,
...@@ -2721,13 +2849,13 @@ ...@@ -2721,13 +2849,13 @@
"_name": "nickname", "_name": "nickname",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 58 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 60 "__id__": 63
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2783,7 +2911,7 @@ ...@@ -2783,7 +2911,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 59 "__id__": 62
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2813,13 +2941,13 @@ ...@@ -2813,13 +2941,13 @@
"_name": "ready", "_name": "ready",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 58 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 62 "__id__": 65
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2875,7 +3003,7 @@ ...@@ -2875,7 +3003,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 61 "__id__": 64
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2908,16 +3036,16 @@ ...@@ -2908,16 +3036,16 @@
"_name": "score", "_name": "score",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 58 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 64 "__id__": 67
}, },
{ {
"__id__": 65 "__id__": 68
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2973,7 +3101,7 @@ ...@@ -2973,7 +3101,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 63 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3006,7 +3134,7 @@ ...@@ -3006,7 +3134,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 63 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
...@@ -3024,23 +3152,23 @@ ...@@ -3024,23 +3152,23 @@
"_name": "ScrollView", "_name": "ScrollView",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 57 "__id__": 60
}, },
"_children": [ "_children": [
{ {
"__id__": 67 "__id__": 70
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 73 "__id__": 76
}, },
{ {
"__id__": 74 "__id__": 77
}, },
{ {
"__id__": 75 "__id__": 78
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3096,20 +3224,20 @@ ...@@ -3096,20 +3224,20 @@
"_name": "view", "_name": "view",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 66 "__id__": 69
}, },
"_children": [ "_children": [
{ {
"__id__": 68 "__id__": 71
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 71 "__id__": 74
}, },
{ {
"__id__": 72 "__id__": 75
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3165,16 +3293,16 @@ ...@@ -3165,16 +3293,16 @@
"_name": "content", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 67 "__id__": 70
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 69 "__id__": 72
}, },
{ {
"__id__": 70 "__id__": 73
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3230,7 +3358,7 @@ ...@@ -3230,7 +3358,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 68 "__id__": 71
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3257,7 +3385,7 @@ ...@@ -3257,7 +3385,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 68 "__id__": 71
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -3289,7 +3417,7 @@ ...@@ -3289,7 +3417,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 67 "__id__": 70
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3309,7 +3437,7 @@ ...@@ -3309,7 +3437,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 67 "__id__": 70
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3336,7 +3464,7 @@ ...@@ -3336,7 +3464,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 69
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3366,7 +3494,7 @@ ...@@ -3366,7 +3494,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 69
}, },
"_enabled": true, "_enabled": true,
"horizontal": false, "horizontal": false,
...@@ -3378,10 +3506,10 @@ ...@@ -3378,10 +3506,10 @@
"scrollEvents": [], "scrollEvents": [],
"cancelInnerEvents": true, "cancelInnerEvents": true,
"_N$content": { "_N$content": {
"__id__": 68 "__id__": 71
}, },
"content": { "content": {
"__id__": 68 "__id__": 71
}, },
"_N$horizontalScrollBar": null, "_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null, "_N$verticalScrollBar": null,
...@@ -3392,7 +3520,7 @@ ...@@ -3392,7 +3520,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 69
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3419,7 +3547,7 @@ ...@@ -3419,7 +3547,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 57 "__id__": 60
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -3446,7 +3574,7 @@ ...@@ -3446,7 +3574,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 56 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3478,20 +3606,20 @@ ...@@ -3478,20 +3606,20 @@
"_name": "restart", "_name": "restart",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 58
}, },
"_children": [ "_children": [
{ {
"__id__": 79 "__id__": 82
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 81 "__id__": 84
}, },
{ {
"__id__": 82 "__id__": 85
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3547,13 +3675,13 @@ ...@@ -3547,13 +3675,13 @@
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 78 "__id__": 81
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 80 "__id__": 83
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3609,7 +3737,7 @@ ...@@ -3609,7 +3737,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 79 "__id__": 82
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3642,7 +3770,7 @@ ...@@ -3642,7 +3770,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 78 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3674,7 +3802,7 @@ ...@@ -3674,7 +3802,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 78 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -3683,7 +3811,7 @@ ...@@ -3683,7 +3811,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 83 "__id__": 86
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -3756,20 +3884,20 @@ ...@@ -3756,20 +3884,20 @@
"_name": "reset", "_name": "reset",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 55 "__id__": 58
}, },
"_children": [ "_children": [
{ {
"__id__": 85 "__id__": 88
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 87 "__id__": 90
}, },
{ {
"__id__": 88 "__id__": 91
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3825,13 +3953,13 @@ ...@@ -3825,13 +3953,13 @@
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 84 "__id__": 87
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 86 "__id__": 89
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3887,7 +4015,7 @@ ...@@ -3887,7 +4015,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 85 "__id__": 88
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3920,7 +4048,7 @@ ...@@ -3920,7 +4048,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 84 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3952,7 +4080,7 @@ ...@@ -3952,7 +4080,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 84 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -3961,7 +4089,7 @@ ...@@ -3961,7 +4089,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 89 "__id__": 92
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -4034,7 +4162,7 @@ ...@@ -4034,7 +4162,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 55 "__id__": 58
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4066,7 +4194,7 @@ ...@@ -4066,7 +4194,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 55 "__id__": 58
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -4093,7 +4221,7 @@ ...@@ -4093,7 +4221,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 55 "__id__": 58
}, },
"_enabled": true, "_enabled": true,
"_id": "733SpyAqlI84P6NfZrepxM" "_id": "733SpyAqlI84P6NfZrepxM"
...@@ -4107,19 +4235,19 @@ ...@@ -4107,19 +4235,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 94 "__id__": 97
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 97 "__id__": 100
}, },
{ {
"__id__": 98 "__id__": 101
}, },
{ {
"__id__": 99 "__id__": 102
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4175,16 +4303,16 @@ ...@@ -4175,16 +4303,16 @@
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 93 "__id__": 96
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 95 "__id__": 98
}, },
{ {
"__id__": 96 "__id__": 99
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4240,7 +4368,7 @@ ...@@ -4240,7 +4368,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 97
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4273,7 +4401,7 @@ ...@@ -4273,7 +4401,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 97
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
...@@ -4291,7 +4419,7 @@ ...@@ -4291,7 +4419,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 93 "__id__": 96
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4323,7 +4451,7 @@ ...@@ -4323,7 +4451,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 93 "__id__": 96
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -4350,7 +4478,7 @@ ...@@ -4350,7 +4478,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 93 "__id__": 96
}, },
"_enabled": true, "_enabled": true,
"_id": "cdYqZbT/VAp5uPVaI4uGT3" "_id": "cdYqZbT/VAp5uPVaI4uGT3"
...@@ -4408,13 +4536,16 @@ ...@@ -4408,13 +4536,16 @@
}, },
"_enabled": true, "_enabled": true,
"rankContent": { "rankContent": {
"__id__": 68 "__id__": 71
}, },
"rankTemplate": { "rankTemplate": {
"__id__": 58 "__id__": 61
}, },
"rankpage": { "rankpage": {
"__id__": 55 "__id__": 58
},
"debug": {
"__id__": 13
}, },
"_id": "eaTVUpqahPfZeO9+sUI7RP" "_id": "eaTVUpqahPfZeO9+sUI7RP"
} }
......
...@@ -16,6 +16,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -16,6 +16,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node) @property(cc.Node)
rankpage: cc.Node = null; rankpage: cc.Node = null;
@property(cc.Label)
debug: cc.Label = null;
addPreloadImage() { addPreloadImage() {
} }
...@@ -32,7 +35,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -32,7 +35,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
roomId = null; roomId = null;
async onLoadEnd() { async onLoadEnd() {
// this.debug.string = `cc.sys.platform==${cc.sys.platform}`;
this.roomId = await getRoomId(); this.roomId = await getRoomId();
// this.roomId = "7254829606002314017";
await this.initView(); await this.initView();
} }
...@@ -49,7 +56,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -49,7 +56,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (startFlag) { if (startFlag) {
this.rankpage.active = true; this.rankpage.active = true;
let rows = await asyncCallNetworkApiGet('/api/douyin/v1/rank', {roomid: this.roomId}); let rows = await asyncCallNetworkApiGet('/api/douyin/v1/rank', {roomid: this.roomId});
// let rows = await asyncCallNetworkApiGet('/api/douyin/v1/rank', {roomid: "7248252618835790603"}); // let rows = await asyncCallNetworkApiGet('/api/douyin/v1/rank', {roomid: "7254829606002314017"});
rows = JSON.parse(rows); rows = JSON.parse(rows);
this.rankContent.removeAllChildren(); this.rankContent.removeAllChildren();
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
...@@ -61,8 +68,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -61,8 +68,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.find(`ready`,itemClone).active = false; cc.find(`ready`,itemClone).active = false;
cc.find(`score`,itemClone).active = true; cc.find(`score`,itemClone).active = true;
cc.find(`score`,itemClone).getComponent(cc.Label).string = row.score; cc.find(`score`,itemClone).getComponent(cc.Label).string = row.score;
const nickObj = JSON.parse(row.nick_name); await this.drawNickName(itemClone, row.nick_name);
await this.drawNickName(itemClone, nickObj);
} }
} else { } else {
this.rankpage.active = false; this.rankpage.active = false;
...@@ -74,7 +80,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -74,7 +80,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}, 1); }, 1);
} }
drawNickName(node, nickObj) { drawNickName(node, data) {
return new Promise((resolve) => { return new Promise((resolve) => {
const image = new Image(); const image = new Image();
image.onload = () => { image.onload = () => {
...@@ -84,13 +90,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -84,13 +90,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
const spriteFrame = new cc.SpriteFrame(texture); const spriteFrame = new cc.SpriteFrame(texture);
const coverNode = cc.find(`nickname`, node); const coverNode = cc.find(`nickname`, node);
coverNode.getComponent(cc.Sprite).spriteFrame = spriteFrame; coverNode.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx = nickObj.width / coverNode.width; // const sx = nickObj.width / coverNode.width;
const sy = nickObj.height / coverNode.height; // const sy = nickObj.height / coverNode.height;
coverNode.scale = Math.max(sx, sy); // coverNode.scale = Math.max(sx, sy);
resolve(); resolve();
} }
image.src = nickObj.data; image.src = data;
// image.src = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ8AAAAtCAYAAACwPO63AAASoElEQVR4Xu2dA5AtSxKG/7e2bRuxtm3btm3bthlr27Zt2/ZufO9VzubklLpPnzPn3OmMuBF3TldXVWdX/ZXu/TTTzIGZAzMHRnBgvxH3zLfMHJg5MHNAM3jMi2DmwMyBURyYwWMU2+abZg7MHJjBY14DMwdmDoziwAweo9g23zRzYObADB7zGpg5MHNgFAdm8BjFtvmmmQMzB5YBHseS9HdJv14Rew8k6cBprP9K+teKxt2LwxxM0gklnUTSVyV9Zx9iAnvhIOl5/iPp34VnO+hEa+14kli70C8k/WXTeDkleNxP0lUlnUrSUyXdakXMuImkZ7qXcPQljHscSaeXdEZJZ5F0aknnl/TDJYy1rl2eVNI33OReKula6zpZSU+SdOs0v1tKelpjrqeU9JXUhuc8eab9YSX9If3+R0nHl/TbkTygH/qDLi3pzSP7Kd12XEnvShd/L+kCkv485RhTgsdrJF3BMZZN/NcpJ1voaxHwOISkI0g6ovsHUHC6nkjSiRNg5IZ+kaTrNp7vDJIuvwIexCG+JOmVSxj33ZIu6Po9tqSfLGGcKbrkALtF6uhhku45ADxomtsbHjxow1r58cjJtsAjAhWSyu8GjAX4fc21P4aknw+4v9l0SvC4qKS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bAg/oqORHW8wA1iWzZXDtCl31WZ/ygd8/iXVUbpF+qwNnBgLsb8Ot1N+bAg01QineAb0hw24yChYdlgyFR+nftm6LO+ITImLjn27I5iV7tKROB0dJ/T5d+dhgyM3OOqnTNuxZdxLkPSu0/RA48sOb6j+esarHkxmGhxKLBiIdIGzkqWeU9eIxJ1mMsSr1ZmfuS5MGiYn4sQl4QOnOvrcOeB0mAGAwIsTkWwvGG3bgIAU9EWkT+HPkSATtcb7v5ogtj+1gZmhB6/ZHOeZYkj5jsxXvCi0He0tB3hZsUNTUmf8aTnW/xlOwiPQFl9sgcHtQpsehSXy29xRYfxl9LleCLgV6NK9aP/R8EPwt5YcOVEgAAAABJRU5ErkJggg==`;
}); });
} }
......
{ {
"title": "play", "title": "play",
"packageName": "org.cocos2d.demo", "packageName": "org.cocos2d.demo",
"startScene": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3", "startScene": "d19b7acc-9db6-4c71-865c-6aa2e00f3a2f",
"excludeScenes": [], "excludeScenes": [],
"includeSDKBox": false, "includeSDKBox": false,
"orientation": { "orientation": {
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
}, },
"ios": { "ios": {
"REMOTE_SERVER_ROOT": "", "REMOTE_SERVER_ROOT": "",
"packageName": "org.cocos2d.demo" "packageName": "org.cocos2d.demo",
"ios_enable_jit": true
}, },
"mac": { "mac": {
"REMOTE_SERVER_ROOT": "", "REMOTE_SERVER_ROOT": "",
...@@ -50,5 +51,6 @@ ...@@ -50,5 +51,6 @@
"scheme": "https", "scheme": "https",
"skipRecord": false "skipRecord": false
}, },
"appBundle": false "appBundle": false,
"agreements": {}
} }
{
"appid": "ttd8b5ae084789dd6810",
"orientation": "landscape",
"separate_engine": false,
"REMOTE_SERVER_ROOT": "",
"subContext": "",
"startSceneAssetBundle": false
}
{ {
"last-module-event-record-time": 1600677246969, "last-module-event-record-time": 1689133324084,
"migrate-history": [ "migrate-history": [
"cloud-function" "cloud-function"
] ]
......
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