Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg29_museum
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
dg29_museum
Commits
d38b7c43
Commit
d38b7c43
authored
Dec 31, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拖拽组件完成
parent
734492a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
563 additions
and
184 deletions
+563
-184
dg29_museum.fire
assets/dg29_museum/scene/dg29_museum.fire
+500
-181
videoCtrl_DG16.ts
assets/dg29_museum/script/ui/videoCtrl_DG16.ts
+63
-3
No files found.
assets/dg29_museum/scene/dg29_museum.fire
View file @
d38b7c43
...
...
@@ -84,22 +84,22 @@
"__id__": 151
},
{
"__id__": 1
83
"__id__": 1
90
},
{
"__id__": 2
03
"__id__": 2
10
}
],
"_active": true,
"_components": [
{
"__id__": 2
05
"__id__": 2
12
},
{
"__id__": 2
06
"__id__": 2
13
},
{
"__id__": 2
07
"__id__": 2
14
}
],
"_prefab": null,
...
...
@@ -5558,18 +5558,27 @@
},
{
"__id__": 164
},
{
"__id__": 166
},
{
"__id__": 168
},
{
"__id__": 180
}
],
"_active": true,
"_components": [
{
"__id__": 18
0
"__id__": 18
7
},
{
"__id__": 18
1
"__id__": 18
8
},
{
"__id__": 18
2
"__id__": 18
9
}
],
"_prefab": null,
...
...
@@ -6204,29 +6213,213 @@
},
{
"__type__": "cc.Node",
"_name": "
slider
",
"_name": "
lb_time1
",
"_objFlags": 0,
"_parent": {
"__id__": 151
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 165
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"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": [
719.777,
-458.136,
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": "b009S4eI5EXaEc9ztwMKXe"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 164
},
"_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": "d4f1dAAYBFRbEfU0ypBSO6"
},
{
"__type__": "cc.Node",
"_name": "lb_time2",
"_objFlags": 0,
"_parent": {
"__id__": 151
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 167
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"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": [
718.828,
-503.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": "4aS8QxmyhIvaRwQrWhuDa6"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 166
},
"_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": "98VR4VOi5G25on2d+UgJrh"
},
{
"__type__": "cc.Node",
"_name": "slider",
"_objFlags": 0,
"_parent": {
"__id__": 151
},
"_children": [
{
"__id__": 169
},
{
"__id__": 17
3
"__id__": 17
1
},
{
"__id__": 17
5
"__id__": 17
3
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 177
...
...
@@ -6291,13 +6484,13 @@
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 16
4
"__id__": 16
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
66
"__id__": 1
70
}
],
"_prefab": null,
...
...
@@ -6353,7 +6546,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
5
"__id__": 16
9
},
"_enabled": true,
"_materials": [
...
...
@@ -6385,13 +6578,13 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 16
4
"__id__": 16
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
68
"__id__": 1
72
}
],
"_prefab": null,
...
...
@@ -6447,7 +6640,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
67
"__id__": 1
71
},
"_enabled": true,
"_materials": [
...
...
@@ -6479,17 +6672,17 @@
"_name": "Handle",
"_objFlags": 0,
"_parent": {
"__id__": 16
4
"__id__": 16
8
},
"_children": [
{
"__id__": 17
0
"__id__": 17
4
}
],
"_active": true,
"_components": [
{
"__id__": 17
2
"__id__": 17
6
}
],
"_prefab": null,
...
...
@@ -6545,13 +6738,13 @@
"_name": "Handle copy",
"_objFlags": 0,
"_parent": {
"__id__": 1
69
"__id__": 1
73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
1
"__id__": 17
5
}
],
"_prefab": null,
...
...
@@ -6607,7 +6800,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
0
"__id__": 17
4
},
"_enabled": true,
"_materials": [
...
...
@@ -6639,7 +6832,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
69
"__id__": 1
73
},
"_enabled": true,
"_normalMaterial": {
...
...
@@ -6714,26 +6907,108 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 1
69
"__id__": 1
73
},
"_id": "b6AurW2UZMu6klj5I0iivx"
},
{
"__type__": "cc.
Node
",
"_name": "
lb_time1
",
"__type__": "cc.
Slider
",
"_name": "",
"_objFlags": 0,
"
_parent
": {
"__id__": 16
4
"
node
": {
"__id__": 16
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 174
}
],
"_prefab": null,
"_opacity": 255,
"_enabled": true,
"direction": 0,
"slideEvents": [],
"_N$handle": {
"__id__": 176
},
"_N$progress": 0.2,
"_id": "94vlNB86NGBo0zzT7ycqox"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
},
"_enabled": false,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "667a35fb-fe5c-44cf-b101-6623785e1786"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0c4wlBvwdElbQvZ88/k7L6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 168
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 20,
"_left": 454.086,
"_right": 0,
"_top": 0,
"_bottom": 68.305,
"_verticalCenter": 0,
"_horizontalCenter": -55.402000000000044,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "3dSPJZVOFPPa9OcbVmVVLr"
},
{
"__type__": "cc.Node",
"_name": "ProgressBar",
"_objFlags": 0,
"_parent": {
"__id__": 151
},
"_children": [
{
"__id__": 181
}
],
"_active": true,
"_components": [
{
"__id__": 185
},
{
"__id__": 186
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -6743,20 +7018,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
97.87
,
"height":
50.4
"width":
1388
,
"height":
12
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1469.17
9,
7.559
,
-748.71
9,
-465.866
,
0,
0,
0,
...
...
@@ -6778,53 +7053,86 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b
009S4eI5EXaEc9ztwMKXe
"
"_id": "b
dLSz4g/lCwJGD4OeENaIL
"
},
{
"__type__": "cc.
Label
",
"_name": "",
"__type__": "cc.
Node
",
"_name": "
bar
",
"_objFlags": 0,
"
node
": {
"__id__": 1
73
"
_parent
": {
"__id__": 1
80
},
"_enabled": true,
"_materials": [
"_children": [
{
"__
uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__
id__": 182
}
],
"_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": "d4f1dAAYBFRbEfU0ypBSO6"
"_active": true,
"_components": [
{
"__id__": 184
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1388,
"height": 12
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "54+Qb0lSxMhruqqoMNIwGp"
},
{
"__type__": "cc.Node",
"_name": "
lb_time2
",
"_name": "
bar_tag
",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
81
},
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
{
"__id__": 1
76
"__id__": 1
83
}
],
"_prefab": null,
...
...
@@ -6838,8 +7146,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
97.87
,
"height": 5
0.4
"width":
56
,
"height": 5
6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -6850,8 +7158,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
1468.23
,
-38.165
,
0
,
0
,
0,
0,
0,
...
...
@@ -6873,14 +7181,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
4aS8QxmyhIvaRwQrWhuDa6
"
"_id": "
52oCI7ktdHZqTozXMeojwz
"
},
{
"__type__": "cc.
Label
",
"__type__": "cc.
Sprite
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
75
"__id__": 1
82
},
"_enabled": true,
"_materials": [
...
...
@@ -6890,46 +7198,61 @@
],
"_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": "98VR4VOi5G25on2d+UgJrh"
"_spriteFrame": {
"__uuid__": "8a399ec0-aa9c-4fe5-b990-a4355ddc9caf"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "5bBw1gHX9IxpWIB6/Dn+5S"
},
{
"__type__": "cc.S
lider
",
"__type__": "cc.S
prite
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
64
"__id__": 1
81
},
"_enabled": true,
"direction": 0,
"slideEvents": [],
"_N$handle": {
"__id__": 172
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dd6a0f64-6c2e-4c04-9140-4868932ea99a"
},
"_N$progress": 0.2,
"_id": "94vlNB86NGBo0zzT7ycqox"
"_type": 3,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "72eBD/O11JpKgJirL6jHB+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
64
"__id__": 1
80
},
"_enabled": true,
"_materials": [
...
...
@@ -6942,7 +7265,7 @@
"_spriteFrame": {
"__uuid__": "667a35fb-fe5c-44cf-b101-6623785e1786"
},
"_type":
0
,
"_type":
1
,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
...
...
@@ -6954,34 +7277,24 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
0c4wlBvwdElbQvZ88/k7L6
"
"_id": "
89KOwr5+5KKrpSChygkBTY
"
},
{
"__type__": "cc.
Widget
",
"__type__": "cc.
ProgressBar
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
64
"__id__": 1
80
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 20,
"_left": 454.086,
"_right": 0,
"_top": 0,
"_bottom": 68.305,
"_verticalCenter": 0,
"_horizontalCenter": -55.402000000000044,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "3dSPJZVOFPPa9OcbVmVVLr"
"_N$totalLength": 1,
"_N$barSprite": {
"__id__": 184
},
"_N$mode": 2,
"_N$progress": 0,
"_N$reverse": false,
"_id": "64BH/Gec5Jua/knu9fDN7y"
},
{
"__type__": "cc.Widget",
...
...
@@ -7025,16 +7338,22 @@
"__id__": 160
},
"vidoSlider": {
"__id__": 177
"__id__": 186
},
"ProgressBar": {
"__id__": 180
},
"playbar": {
"__id__": 1
67
"__id__": 1
71
},
"nowTime": {
"__id__": 1
74
"__id__": 1
65
},
"totalTime": {
"__id__": 176
"__id__": 167
},
"barTag": {
"__id__": 182
},
"_id": "40uKOXbmdKqIs73UDwwRGu"
},
...
...
@@ -7057,13 +7376,13 @@
},
"_children": [
{
"__id__": 1
84
"__id__": 1
91
},
{
"__id__": 1
89
"__id__": 1
96
},
{
"__id__": 19
0
"__id__": 19
7
}
],
"_active": true,
...
...
@@ -7121,14 +7440,14 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 1
83
"__id__": 1
90
},
"_children": [
{
"__id__": 1
85
"__id__": 1
92
},
{
"__id__": 1
87
"__id__": 1
94
}
],
"_active": true,
...
...
@@ -7186,13 +7505,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 1
84
"__id__": 1
91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
86
"__id__": 1
93
}
],
"_prefab": null,
...
...
@@ -7248,7 +7567,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
85
"__id__": 1
92
},
"_enabled": true,
"_materials": [
...
...
@@ -7283,13 +7602,13 @@
"_name": "MuliBold",
"_objFlags": 0,
"_parent": {
"__id__": 1
84
"__id__": 1
91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
88
"__id__": 1
95
}
],
"_prefab": null,
...
...
@@ -7345,7 +7664,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
87
"__id__": 1
94
},
"_enabled": true,
"_materials": [
...
...
@@ -7380,7 +7699,7 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 1
83
"__id__": 1
90
},
"_children": [],
"_active": true,
...
...
@@ -7438,26 +7757,26 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 1
83
"__id__": 1
90
},
"_children": [
{
"__id__": 19
1
"__id__": 19
8
},
{
"__id__":
193
"__id__":
200
},
{
"__id__":
195
"__id__":
202
},
{
"__id__":
197
"__id__":
204
},
{
"__id__":
199
"__id__":
206
},
{
"__id__": 20
1
"__id__": 20
8
}
],
"_active": true,
...
...
@@ -7515,13 +7834,13 @@
"_name": "dispear",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
2
"__id__": 19
9
}
],
"_prefab": null,
...
...
@@ -7577,7 +7896,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
1
"__id__": 19
8
},
"_enabled": true,
"_clip": {
...
...
@@ -7596,13 +7915,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
194
"__id__":
201
}
],
"_prefab": null,
...
...
@@ -7658,7 +7977,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
193
"__id__":
200
},
"_enabled": true,
"_clip": {
...
...
@@ -7677,13 +7996,13 @@
"_name": "wrong",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
196
"__id__":
203
}
],
"_prefab": null,
...
...
@@ -7739,7 +8058,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
195
"__id__":
202
},
"_enabled": true,
"_clip": {
...
...
@@ -7758,13 +8077,13 @@
"_name": "lose",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
198
"__id__":
205
}
],
"_prefab": null,
...
...
@@ -7820,7 +8139,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
197
"__id__":
204
},
"_enabled": true,
"_clip": {
...
...
@@ -7839,13 +8158,13 @@
"_name": "win",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
0
"__id__": 20
7
}
],
"_prefab": null,
...
...
@@ -7901,7 +8220,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
199
"__id__":
206
},
"_enabled": true,
"_clip": {
...
...
@@ -7920,13 +8239,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 19
0
"__id__": 19
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
2
"__id__": 20
9
}
],
"_prefab": null,
...
...
@@ -7982,7 +8301,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
1
"__id__": 20
8
},
"_enabled": true,
"_clip": {
...
...
@@ -8007,7 +8326,7 @@
"_active": true,
"_components": [
{
"__id__": 2
04
"__id__": 2
11
}
],
"_prefab": null,
...
...
@@ -8063,7 +8382,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
03
"__id__": 2
10
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -8148,7 +8467,7 @@
"__id__": 151
},
"touchlayer": {
"__id__": 2
03
"__id__": 2
10
},
"root_game": {
"__id__": 143
...
...
assets/dg29_museum/script/ui/videoCtrl_DG16.ts
View file @
d38b7c43
...
...
@@ -16,8 +16,10 @@ export default class videoCtrl extends cc.Component {
@
property
(
cc
.
Node
)
vidoStateIcon
:
cc
.
Node
=
null
;
@
property
(
cc
.
Slider
)
vidoSlider
:
cc
.
Slider
=
null
;
@
property
(
cc
.
ProgressBar
)
vidoSlider
:
cc
.
ProgressBar
=
null
;
@
property
(
cc
.
Node
)
ProgressBar
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
playbar
:
cc
.
Node
=
null
;
...
...
@@ -39,6 +41,7 @@ export default class videoCtrl extends cc.Component {
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
touchVideoLayer
,
this
)
this
.
initDrag
();
}
touchVideoLayer
()
{
...
...
@@ -121,8 +124,17 @@ export default class videoCtrl extends cc.Component {
let
total
=
Math
.
ceil
(
this
.
_videoCom
.
getDuration
());
this
.
nowTime
.
string
=
this
.
makeTimeStr
(
now
)
this
.
totalTime
.
string
=
this
.
makeTimeStr
(
total
)
this
.
vidoSlider
.
progress
=
now
/
total
;
this
.
updateSlider
(
now
,
total
)
}
}
updateSlider
(
now
,
total
)
{
let
percent
=
now
/
total
this
.
vidoSlider
.
progress
=
now
/
total
;
const
maxX
=
this
.
ProgressBar
.
width
;
const
minX
=
0
;
let
newX
=
percent
*
maxX
;
newX
=
Math
.
min
(
maxX
,
Math
.
max
(
newX
,
minX
));
this
.
barTag
.
x
=
newX
;
}
makeTimeStr
(
time
)
{
...
...
@@ -132,4 +144,52 @@ export default class videoCtrl extends cc.Component {
return
`
${
min
<
10
?
"
0
"
+
min
:
min
}
:
${
sec
<
10
?
"
0
"
+
sec
:
sec
}
`
}
@
property
(
cc
.
Node
)
barTag
:
cc
.
Node
=
null
;
initDrag
()
{
const
maxX
=
this
.
vidoSlider
.
node
.
width
;
const
minX
=
0
;
this
.
barTag
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
this
.
barTag
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
e
)
=>
{
console
.
log
(
"
TOUCH_START
"
);
});
this
.
barTag
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
);
this
.
barTag
.
on
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
(
e
)
=>
{
const
worldPos
=
e
.
getLocation
();
const
localPos
=
this
.
barTag
.
parent
.
convertToNodeSpaceAR
(
worldPos
);
let
newX
=
localPos
.
x
;
newX
=
Math
.
min
(
maxX
,
Math
.
max
(
newX
,
minX
));
this
.
barTag
.
x
=
newX
;
const
percent
=
newX
/
maxX
;
const
dur
=
this
.
_videoCom
.
getDuration
();
let
now
=
Math
.
ceil
(
this
.
_videoCom
?.
currentTime
)
let
total
=
Math
.
ceil
(
this
.
_videoCom
.
getDuration
());
this
.
nowTime
.
string
=
this
.
makeTimeStr
(
now
)
this
.
_videoCom
.
currentTime
=
percent
*
dur
;
});
this
.
barTag
.
off
(
cc
.
Node
.
EventType
.
TOUCH_END
);
this
.
barTag
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
(
e
)
=>
{
console
.
log
(
"
TOUCH_ENDED
"
);
this
.
updateBarByPos
(
this
.
barTag
.
x
);
});
this
.
barTag
.
off
(
cc
.
Node
.
EventType
.
MOUSE_UP
);
this
.
barTag
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
(
e
)
=>
{
console
.
log
(
"
MOUSE_UP
"
);
this
.
updateBarByPos
(
this
.
barTag
.
x
);
});
}
updateBarByPos
(
newX
)
{
const
maxX
=
this
.
vidoSlider
.
node
.
width
;
const
minX
=
0
;
let
percent
=
newX
/
maxX
;
if
(
percent
>
1
)
{
percent
=
1
}
const
dur
=
this
.
_videoCom
.
getDuration
();
this
.
_videoCom
.
currentTime
=
percent
*
dur
}
}
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