Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_NJ
Commits
6452008b
Commit
6452008b
authored
Jul 25, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: debug标识
parent
8e7243bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
3 deletions
+137
-3
middleLayer_for_NJ.fire
assets/middleLayer_for_NJ/scene/middleLayer_for_NJ.fire
+130
-2
middleLayer.ts
assets/middleLayer_for_NJ/script/middleLayer.ts
+7
-1
No files found.
assets/middleLayer_for_NJ/scene/middleLayer_for_NJ.fire
View file @
6452008b
...
...
@@ -317,15 +317,18 @@
},
{
"__id__": 122
},
{
"__id__": 124
}
],
"_active": true,
"_components": [
{
"__id__": 12
4
"__id__": 12
7
},
{
"__id__": 12
5
"__id__": 12
8
}
],
"_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": "",
...
...
assets/middleLayer_for_NJ/script/middleLayer.ts
View file @
6452008b
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment