Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_DG
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_DG
Commits
40a19edc
Commit
40a19edc
authored
Oct 31, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 退出APP功能改变
parent
3f445935
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
638 deletions
+45
-638
middleLayer_for_DG.fire
assets/middleLayer_for_DG/scene/middleLayer_for_DG.fire
+27
-621
middleLayer.ts
assets/middleLayer_for_DG/script/middleLayer.ts
+18
-16
middleLayerBase.ts
assets/middleLayer_for_DG/script/middleLayerBase.ts
+0
-1
No files found.
assets/middleLayer_for_DG/scene/middleLayer_for_DG.fire
View file @
40a19edc
...
@@ -299,31 +299,22 @@
...
@@ -299,31 +299,22 @@
"__id__": 9
"__id__": 9
},
},
{
{
"__id__": 13
"__id__": 11
},
{
"__id__": 17
},
},
{
{
"__id__": 21
"__id__": 21
},
},
{
{
"__id__": 23
"__id__": 23
},
{
"__id__": 33
},
{
"__id__": 35
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
37
"__id__":
25
},
},
{
{
"__id__":
38
"__id__":
26
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -374,591 +365,6 @@
...
@@ -374,591 +365,6 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": "c2DZ4wlX1HzbimXNoMnVZO"
"_id": "c2DZ4wlX1HzbimXNoMnVZO"
},
},
{
"__type__": "cc.Node",
"_name": "ExitBtn",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 131,
"height": 131
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-863.522,
453.12800000000004,
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": "eacQSP+NxNWYIBuiqnv/FH"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "25VWkik+9GAKOaKfpA9Tf6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 9,
"_left": 30.977999999999952,
"_right": 0,
"_top": 21.371999999999957,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "669Abf8UBIJ5w+8w83zBHw"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "57bdc862-1a68-4657-9b66-b5115d097b7e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "30FbSxv/hP9r+UK0P/aTYj"
},
{
"__type__": "cc.Node",
"_name": "BtnLeft",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 14
},
{
"__id__": 15
},
{
"__id__": 16
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 146
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
757.75,
483.5,
0,
0,
0,
0,
1,
-0.5,
0.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "373lsjYxpDjpBPdG7XpKNm"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "74T1oR96VGfbL7Rscguciw"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 33,
"_left": 20,
"_right": 150,
"_top": 20,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 61,
"_originalHeight": 0,
"_id": "4bUHjla2BOwLTjCU561v1O"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b2282c0f-dd0f-4bf3-9d51-63fd72bd25ca"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "34fnL+7EFC5ahjRfoVG4qk"
},
{
"__type__": "cc.Node",
"_name": "BtnRight",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 146
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
887.75,
483.5,
0,
0,
0,
0,
1,
0.5,
0.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8cBKHK6udLybTPmRmBBF98"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "c5vS0hDupNequQ4j3jK6Uk"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 33,
"_left": 20,
"_right": 20,
"_top": 20,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 84,
"_originalHeight": 0,
"_id": "e3o0XQ1KlN9qhDSk0KTqMm"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b2282c0f-dd0f-4bf3-9d51-63fd72bd25ca"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ccVC042cxCdIpDBInpf/O+"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "layout",
"_name": "layout",
...
@@ -970,7 +376,7 @@
...
@@ -970,7 +376,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
22
"__id__":
10
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1026,7 +432,7 @@
...
@@ -1026,7 +432,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
21
"__id__":
9
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1062,16 +468,16 @@
...
@@ -1062,16 +468,16 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
24
"__id__":
12
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
31
"__id__":
19
},
},
{
{
"__id__":
32
"__id__":
20
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1127,24 +533,24 @@
...
@@ -1127,24 +533,24 @@
"_name": "progress",
"_name": "progress",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
23
"__id__":
11
},
},
"_children": [
"_children": [
{
{
"__id__":
25
"__id__":
13
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
28
"__id__":
16
},
},
{
{
"__id__":
29
"__id__":
17
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
30
"__id__":
18
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1198,17 +604,17 @@
...
@@ -1198,17 +604,17 @@
"_name": "bar",
"_name": "bar",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
24
"__id__":
12
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
26
"__id__":
14
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
27
"__id__":
15
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1262,7 +668,7 @@
...
@@ -1262,7 +668,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
25
"__id__":
13
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1292,7 +698,7 @@
...
@@ -1292,7 +698,7 @@
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
"__id__":
24
"__id__":
12
},
},
"asset": {
"asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...
@@ -1305,7 +711,7 @@
...
@@ -1305,7 +711,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
24
"__id__":
12
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1337,7 +743,7 @@
...
@@ -1337,7 +743,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
24
"__id__":
12
},
},
"_enabled": true,
"_enabled": true,
"_id": "3eMT/DXoJNGZT/8Z3nuTUH"
"_id": "3eMT/DXoJNGZT/8Z3nuTUH"
...
@@ -1345,7 +751,7 @@
...
@@ -1345,7 +751,7 @@
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
"__id__":
24
"__id__":
12
},
},
"asset": {
"asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...
@@ -1358,7 +764,7 @@
...
@@ -1358,7 +764,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
23
"__id__":
11
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1390,7 +796,7 @@
...
@@ -1390,7 +796,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
23
"__id__":
11
},
},
"_enabled": true,
"_enabled": true,
"_id": "d9Sm5lOKBAxKufJF2Q8Nr8"
"_id": "d9Sm5lOKBAxKufJF2Q8Nr8"
...
@@ -1406,7 +812,7 @@
...
@@ -1406,7 +812,7 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
34
"__id__":
22
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1462,7 +868,7 @@
...
@@ -1462,7 +868,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
33
"__id__":
21
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1500,7 +906,7 @@
...
@@ -1500,7 +906,7 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
36
"__id__":
24
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1556,7 +962,7 @@
...
@@ -1556,7 +962,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
35
"__id__":
23
},
},
"_enabled": true,
"_enabled": true,
"_id": "c8RSZKHRJO95/RfIMIkSA5"
"_id": "c8RSZKHRJO95/RfIMIkSA5"
...
...
assets/middleLayer_for_DG/script/middleLayer.ts
View file @
40a19edc
...
@@ -70,23 +70,25 @@ export default class NewClass extends middleLayerBase {
...
@@ -70,23 +70,25 @@ export default class NewClass extends middleLayerBase {
});
});
}
}
exitFlag
;
exitGame
(
data
=
null
)
{
if
(
this
.
token
)
{
this
.
callNetworkApiPost
(
`api/dige/v1/user/report`
,
{
token
:
this
.
token
,
syllabus_id
:
this
.
courseItem
.
course_id
,
courseware_id
:
this
.
courseItem
.
id
,
template_name
:
this
.
courseItem
.
template_name
,
study_duration
:
Date
.
now
()
-
this
.
courseOpenTimeStamp
,
result
:
JSON
.
stringify
(
data
),
},
()
=>
{
this
.
callNativeFunction
({
name
:
"
exit
"
,
value
:
""
});
});
}
else
{
this
.
callNativeFunction
({
name
:
"
exit
"
,
value
:
""
});
}
}
initListener
()
{
initListener
()
{
const
ExitBtn
=
cc
.
find
(
'
middleLayer/ExitBtn
'
);
ExitBtn
.
on
(
"
click
"
,
()
=>
{
if
(
this
.
exitFlag
)
{
return
;
}
this
.
exitFlag
=
true
;
cc
.
tween
(
ExitBtn
)
.
to
(
0.1
,
{
scaleX
:
0.9
,
scaleY
:
1.1
})
.
to
(
0.1
,
{
scaleX
:
1.1
,
scaleY
:
0.9
})
.
to
(
0.1
,
{
scaleX
:
1
,
scaleY
:
1
})
.
call
(()
=>
{
this
.
callNativeFunction
({
name
:
"
exit
"
,
value
:
""
});
})
.
start
();
});
}
}
reWriteAir
()
{
reWriteAir
()
{
...
...
assets/middleLayer_for_DG/script/middleLayerBase.ts
View file @
40a19edc
...
@@ -205,7 +205,6 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -205,7 +205,6 @@ export abstract class middleLayerBase extends cc.Component {
console
.
log
(
'
sceneName =
'
+
sceneName
);
console
.
log
(
'
sceneName =
'
+
sceneName
);
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
cc
.
find
(
'
middleLayer/ExitBtn
'
).
active
=
true
;
this
.
hideWaitingLetters
();
this
.
hideWaitingLetters
();
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
middleLayer
.
scale
=
canvas
.
width
/
middleLayer
.
width
;
middleLayer
.
scale
=
canvas
.
width
/
middleLayer
.
width
;
...
...
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