Commit 6452008b authored by liujiangnan's avatar liujiangnan

feat: debug标识

parent 8e7243bb
......@@ -317,15 +317,18 @@
},
{
"__id__": 122
},
{
"__id__": 124
}
],
"_active": true,
"_components": [
{
"__id__": 124
"__id__": 127
},
{
"__id__": 125
"__id__": 128
}
],
"_prefab": null,
......@@ -5807,6 +5810,131 @@
"groupIndex": 0,
"_id": "67yuNHm85BXrPkyBGbmxc8"
},
{
"__type__": "cc.Node",
"_name": "debug",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 125
},
{
"__id__": 126
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 49,
"g": 242,
"b": 6,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 75.61,
"height": 25.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
609.4250000000001,
-347.4,
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": "e5lGTqZXtGIbCn+lY3Dx3/"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Debug...",
"_N$string": "Debug...",
"_fontSize": 20,
"_lineHeight": 20,
"_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": "83wjHak9dKxaRwpMOpGKd0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": -7.23,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "2fAw3kDz9Nr4NeXnq0G/fp"
},
{
"__type__": "d98e34LKINGEIpG3utycEds",
"_name": "",
......
......@@ -94,6 +94,7 @@ export default class NewClass extends middleLayerBase {
}
version = null;
isDev = null;
async checkVersion() {
const { versionName: onlineVersion, storeList } = await this.getOnlineVersion();
const nativeVersion = await this.getNativeVersion();
......@@ -107,8 +108,9 @@ export default class NewClass extends middleLayerBase {
}
async getNativeVersion() {
const engineInfo = await this.getEngineInfo();
const { version } = JSON.parse(engineInfo);
const { version, isDev } = JSON.parse(engineInfo);
this.version = version;
this.isDev = isDev;
return this.version;
}
......@@ -656,6 +658,10 @@ export default class NewClass extends middleLayerBase {
cc.game.addPersistRootNode(this.node);
await this.checkVersion();
if (this.isDev == 1) {
cc.find(`middleLayer/debug`).active = true;
}
cc.find('middleLayer/BtnRight').active = false;
cc.find('middleLayer/BtnLeft').active = false;
cc.find('middleLayer/ExitBtn').active = false;
......
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