Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
apk_product
/
ForFun
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
9323a571
...
9323a57192e45438baff940c9e46a359c44045cd
authored
2020-03-20 18:42:12 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.视频详情页开发完成
1 parent
db8a8b11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
287 additions
and
256 deletions
assets/Scene/sceneVideoDetail.fire
assets/Script/videoDetail.js
assets/Scene/sceneVideoDetail.fire
View file @
9323a57
...
...
@@ -108,16 +108,16 @@
"__id__": 63
},
{
"__id__":
71
"__id__":
69
}
],
"_active": true,
"_components": [
{
"__id__": 7
6
"__id__": 7
8
},
{
"__id__": 7
7
"__id__": 7
9
}
],
"_prefab": null,
...
...
@@ -207,7 +207,7 @@
"array": [
0,
0,
2
50.28134155273438
,
2
71.0659484863281
,
0,
0,
0,
...
...
@@ -2744,7 +2744,7 @@
},
{
"__type__": "cc.Node",
"_name": "
Navi
Area",
"_name": "
Episode
Area",
"_objFlags": 0,
"_parent": {
"__id__": 2
...
...
@@ -2754,14 +2754,15 @@
"__id__": 64
},
{
"__id__": 67
},
{
"__id__": 69
"__id__": 66
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 68
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -2773,8 +2774,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
048
,
"height":
54
"width": 1
216
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2783,8 +2784,8 @@
},
"_position": {
"__type__": "cc.Vec3",
"x": -5
27
,
"y": -
87
,
"x": -5
78
,
"y": -
213
,
"z": 0
},
"_scale": {
...
...
@@ -2797,8 +2798,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-5
84.0960083007812
,
-1
41.68699645996094
,
-5
76
,
-1
23
,
0,
0,
0,
...
...
@@ -2820,24 +2821,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
9bUT3s9IBIKbJ1BBhEIwLu
"
"_id": "
63IGZQo85FK7MnO1k11ML5
"
},
{
"__type__": "cc.Node",
"_name": "
NaviListWrapper
",
"_name": "
GraphicsLine
",
"_objFlags": 0,
"_parent": {
"__id__": 63
},
"_children": [
{
"__id__": 65
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
6
"__id__": 6
5
}
],
"_prefab": null,
...
...
@@ -2851,12 +2848,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
1048
,
"height":
54
"width":
0
,
"height":
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0
.5
,
"y": 0.5
},
"_position": {
...
...
@@ -2898,16 +2895,53 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4a5x7lgWRO85/6Adt1XYRW"
"_id": "02j7W4daNBWoVUjIzaPKpS"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "6f801092-0c37-4f30-89ef-c8d960825b36"
}
],
"_lineWidth": 10,
"_strokeColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_miterLimit": 10,
"_id": "723sSJ34lMq6ZVBc5AiMbz"
},
{
"__type__": "cc.Node",
"_name": "
NaviList
",
"_name": "
EpisodeListWrapper
",
"_objFlags": 0,
"_parent": {
"__id__": 6
4
"__id__": 6
3
},
"_children": [],
"_children": [
{
"__id__": 67
}
],
"_active": true,
"_components": [],
"_prefab": null,
...
...
@@ -2921,8 +2955,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
048
,
"height":
54
"width": 1
230
,
"height":
80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2945,7 +2979,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0
,
-14
,
0,
0,
0,
...
...
@@ -2968,44 +3002,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "248M67U3pPVI1iY71AOoCI"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "b6YSVDYp1E8YBnPy3CupxI"
"_id": "55Q3bZ+dxB+o5g/xU/qS+w"
},
{
"__type__": "cc.Node",
"_name": "
LeftIcon
",
"_name": "
EpisodeList
",
"_objFlags": 0,
"_parent": {
"__id__": 6
3
"__id__": 6
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 68
}
],
"_components": [],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -3015,18 +3025,18 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
17
,
"height":
23
"width":
0
,
"height":
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x":
-14.5
,
"y":
-0.5
,
"x":
0
,
"y":
0
,
"z": 0
},
"_scale": {
...
...
@@ -3039,7 +3049,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0
,
14
,
0,
0,
0,
...
...
@@ -3062,50 +3072,61 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
55MXsXf2JJ25qncAIA6+o/
"
"_id": "
2alW/41MRPD5q10J7LUoMI
"
},
{
"__type__": "cc.
Sprite
",
"__type__": "cc.
Widget
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
7
"__id__": 6
3
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fdkeSUmCJCiYeT1sDA1+XZ"
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 64,
"_right": 0,
"_top": 453,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "d2HjLY5wFAOL1pqnTIF1ep"
},
{
"__type__": "cc.Node",
"_name": "
RightIcon
",
"_name": "
NaviArea
",
"_objFlags": 0,
"_parent": {
"__id__":
63
"__id__":
2
},
"_children": [],
"_children": [
{
"__id__": 70
},
{
"__id__": 73
},
{
"__id__": 75
}
],
"_active": true,
"_components": [
{
"__id__": 7
0
"__id__": 7
7
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -3115,18 +3136,18 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
7
,
"height":
23
"width": 1
048
,
"height":
54
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x":
1070.5
,
"y": -
0.5
,
"x":
-527
,
"y": -
87
,
"z": 0
},
"_scale": {
...
...
@@ -3139,8 +3160,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0
,
0,
-576
,
-19
0,
0,
0,
0,
...
...
@@ -3162,51 +3183,26 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c3K7xTUXNMEZkx1EGnKvv+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6eFbd8rM1GkLH8hJ4bA4t6"
"_id": "9bUT3s9IBIKbJ1BBhEIwLu"
},
{
"__type__": "cc.Node",
"_name": "
EpisodeArea
",
"_name": "
NaviListWrapper
",
"_objFlags": 0,
"_parent": {
"__id__":
2
"__id__":
69
},
"_children": [
{
"__id__": 72
},
{
"__id__": 74
"__id__": 71
}
],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 72
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -3218,8 +3214,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
199
,
"height": 5
0
"width": 1
048
,
"height": 5
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3228,8 +3224,8 @@
},
"_position": {
"__type__": "cc.Vec3",
"x":
-578
,
"y":
-213
,
"x":
0
,
"y":
0
,
"z": 0
},
"_scale": {
...
...
@@ -3242,8 +3238,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-601.4459838867188
,
-205.30099487304688
,
0
,
0
,
0,
0,
0,
...
...
@@ -3265,22 +3261,18 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
63IGZQo85FK7MnO1k11ML5
"
"_id": "
4a5x7lgWRO85/6Adt1XYRW
"
},
{
"__type__": "cc.Node",
"_name": "
GraphicsLine
",
"_name": "
NaviList
",
"_objFlags": 0,
"_parent": {
"__id__": 7
1
"__id__": 7
0
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 73
}
],
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -3292,12 +3284,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
0
,
"height":
0
"width":
1048
,
"height":
54
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
},
"_position": {
...
...
@@ -3339,57 +3331,44 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
02j7W4daNBWoVUjIzaPKpS
"
"_id": "
248M67U3pPVI1iY71AOoCI
"
},
{
"__type__": "cc.
Graphics
",
"__type__": "cc.
Mask
",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
0
},
"_enabled": true,
"_materials": [
{
"__uuid__": "
6f801092-0c37-4f30-89ef-c8d960825b36
"
"__uuid__": "
eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432
"
}
],
"_lineWidth": 10,
"_strokeColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_miterLimit": 10,
"_id": "723sSJ34lMq6ZVBc5AiMbz"
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "b6YSVDYp1E8YBnPy3CupxI"
},
{
"__type__": "cc.Node",
"_name": "
EpisodeListWrapper
",
"_name": "
LeftIcon
",
"_objFlags": 0,
"_parent": {
"__id__":
71
"__id__":
69
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
5
"__id__": 7
4
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity":
255
,
"_opacity":
0
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -3399,18 +3378,18 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
800
,
"height":
150
"width":
17
,
"height":
23
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0
.5
,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x":
0
,
"y":
0
,
"x":
-14.5
,
"y":
-0.5
,
"z": 0
},
"_scale": {
...
...
@@ -3446,20 +3425,50 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "55Q3bZ+dxB+o5g/xU/qS+w"
"_id": "55MXsXf2JJ25qncAIA6+o/"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fdkeSUmCJCiYeT1sDA1+XZ"
},
{
"__type__": "cc.Node",
"_name": "
EpisodeList
",
"_name": "
RightIcon
",
"_objFlags": 0,
"_parent": {
"__id__":
74
"__id__":
69
},
"_children": [],
"_active": true,
"_components": [],
"_components": [
{
"__id__": 76
}
],
"_prefab": null,
"_opacity":
255
,
"_opacity":
0
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -3469,18 +3478,18 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
0
,
"height":
0
"width":
17
,
"height":
23
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0
.5
,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x":
0
,
"y":
0
,
"x":
1070.5
,
"y":
-0.5
,
"z": 0
},
"_scale": {
...
...
@@ -3516,7 +3525,60 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2alW/41MRPD5q10J7LUoMI"
"_id": "c3K7xTUXNMEZkx1EGnKvv+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6eFbd8rM1GkLH8hJ4bA4t6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 64,
"_right": 0,
"_top": 523,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "bdQNgiwHBPYo/NXAvMvTJC"
},
{
"__type__": "cc.Canvas",
...
...
@@ -3559,6 +3621,7 @@
"_oFocusScaleFactorInfo": null,
"_bShowExitBox": false,
"_iCurrentNaviNumLoc": 1,
"_bIsNaviDataInit": false,
"PFB_NAVI": {
"__uuid__": "67426bbf-20cf-4cd0-8ed8-606c117cb81d"
},
...
...
assets/Script/videoDetail.js
View file @
9323a57
...
...
@@ -15,6 +15,7 @@ cc.Class({
properties
:
{
_iCurrentNaviNumLoc
:
1
,
_bIsNaviDataInit
:
false
,
//是否初始化Navi
PFB_NAVI
:
{
default
:
null
,
type
:
cc
.
Prefab
,
...
...
@@ -65,6 +66,7 @@ cc.Class({
//剧集分类
this
.
_nodeEpisodeListWrapper
=
cc
.
find
(
"EpisodeArea/EpisodeListWrapper"
,
this
.
node
);
this
.
_nodeEpisodeList
=
cc
.
find
(
"EpisodeList"
,
this
.
_nodeEpisodeListWrapper
);
this
.
_nodeEpisodeList
.
addComponent
(
TVScrollParameter
);
// this.initPrefab();
this
.
checkPfbReadyAndInitPage
();
...
...
@@ -95,10 +97,14 @@ cc.Class({
var
oJSONResult
=
JSON
.
parse
(
strResponse
);
this
.
_oEpisode
=
oJSONResult
;
if
(
oJSONResult
.
businessCode
==
'success'
)
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
nodeEpisodeListCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
for
(
let
i
=
0
;
i
<
20
;
i
++
)
{
if
(
i
>=
oJSONResult
.
resultSet
.
length
)
{
//数据较少时
continue
;
}
let
nodeEpisodeCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
nodeEpisodeCell
.
x
=
nodeEpisodeCell
.
width
/
2
+
(
i
)
*
(
nodeEpisodeCell
.
width
+
20
);
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeListCell
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
i
].
name
;
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeCell
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
i
].
name
;
this
.
_nodeEpisodeList
.
addChild
(
nodeEpisodeCell
,
10
,
"EpisodeListCell"
+
i
);
let
fiEpisodeBlock
=
nodeEpisodeCell
.
addComponent
(
FocusInfo
);
fiEpisodeBlock
.
init
(
''
,
true
,
null
,
null
,
1.0
);
...
...
@@ -301,6 +307,23 @@ cc.Class({
}
}
if
(
fiFocusTarget
&&
0
==
fiFocusTarget
.
node
.
name
.
indexOf
(
"EpisodeListCell"
))
{
if
(
fiFocusTarget
.
node
.
x
-
fiFocusTarget
.
node
.
width
/
2
+
this
.
_nodeEpisodeList
.
x
>=
this
.
_nodeEpisodeListWrapper
.
width
)
{
oScrollParameter
=
this
.
_nodeEpisodeList
.
getComponent
(
TVScrollParameter
);
oScrollParameter
.
setHasRelation
(
true
);
oScrollParameter
.
setStep
((
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
+
this
.
_nodeEpisodeList
.
x
)
-
this
.
_nodeEpisodeListWrapper
.
width
+
20
);
oScrollParameter
.
setTargetPosition
(
this
.
_nodeEpisodeList
.
x
-
oScrollParameter
.
getStep
());
// this._oSceneContext._nodeNaviListX = this._nodeEpisodeList.x - oScrollParameter.getStep();
}
if
(
fiFocusTarget
.
node
.
x
+
this
.
_nodeEpisodeList
.
x
<
0
)
{
oScrollParameter
=
this
.
_nodeEpisodeList
.
getComponent
(
TVScrollParameter
);
oScrollParameter
.
setHasRelation
(
true
);
oScrollParameter
.
setStep
(
-
fiFocusTarget
.
node
.
x
+
fiFocusTarget
.
node
.
width
/
2
-
this
.
_nodeEpisodeList
.
x
+
16
);
oScrollParameter
.
setTargetPosition
(
this
.
_nodeEpisodeList
.
x
+
oScrollParameter
.
getStep
())
// this._oSceneContext._nodeNaviListX = this._nodeEpisodeList.x + oScrollParameter.getStep();
}
}
return
[
fiFocusTarget
,
oScrollParameter
];
},
...
...
@@ -317,11 +340,6 @@ cc.Class({
break
;
case
cc
.
macro
.
KEY
.
right
:
case
Common
.
ANDROID_KEY
.
right
:
let
index
=
this
.
_fiCurrentFocus
.
node
.
name
.
replace
(
'EpisodeListCell'
,
''
);
if
(
0
==
this
.
_fiCurrentFocus
.
node
.
name
.
indexOf
(
'EpisodeListCell'
)
&&
index
==
3
&&
this
.
_oSceneContext
.
currentPage
*
4
<
this
.
_oEpisode
.
resultSet
.
length
)
{
this
.
_oSceneContext
.
currentPage
++
;
this
.
moveEpisode
();
}
this
.
keyDownDirection
(
Common
.
MOVE_DIRECTION_RIGHT
);
break
;
case
cc
.
macro
.
KEY
.
down
:
...
...
@@ -330,11 +348,6 @@ cc.Class({
break
;
case
cc
.
macro
.
KEY
.
left
:
case
Common
.
ANDROID_KEY
.
left
:
let
index2
=
this
.
_fiCurrentFocus
.
node
.
name
.
replace
(
'EpisodeListCell'
,
''
);
if
(
0
==
this
.
_fiCurrentFocus
.
node
.
name
.
indexOf
(
'EpisodeListCell'
)
&&
index2
==
0
&&
this
.
_oSceneContext
.
currentPage
>
1
)
{
this
.
_oSceneContext
.
currentPage
--
;
this
.
moveEpisode
();
}
this
.
keyDownDirection
(
Common
.
MOVE_DIRECTION_LEFT
);
break
;
case
cc
.
macro
.
KEY
.
enter
:
...
...
@@ -381,51 +394,6 @@ cc.Class({
}
},
//移动剧集
moveEpisode
:
function
()
{
let
index
=
(
this
.
_oSceneContext
.
currentPage
-
1
)
*
4
;
for
(
let
i
=
index
;
i
<
index
+
4
;
i
++
)
{
let
nodeEpisodeListCell
=
this
.
_nodeEpisodeList
.
getChildByName
(
"EpisodeListCell"
+
i
%
4
);
// if (i >= this._oEpisode.resultSet.length) {//数据较少时隐藏其他多余预制体
// nodeEpisodeListCell.active = false; //
// continue;
// }
nodeEpisodeListCell
.
active
=
true
;
//恢复预制可见及可点击
if
(
this
.
_oEpisode
.
resultSet
[
i
])
{
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeListCell
).
getComponent
(
cc
.
Label
).
string
=
this
.
_oEpisode
.
resultSet
[
i
].
name
;
if
(
this
.
_strEpisodeImg
)
{
Network
.
loadImageInNativeRuntime
(
Common
.
TOPDRAW_IMAGE_SERVER
+
this
.
_strEpisodeImg
,
function
(
texture
)
{
nodeEpisodeListCell
.
getChildByName
(
"Bg"
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
);
},
null
,
this
);
}
}
else
{
nodeEpisodeListCell
.
active
=
false
;
}
this
.
_cFocus
.
hide
();
this
.
scheduleOnce
(()
=>
{
//指定0让回调函数在下一帧立即执行
this
.
_cFocus
.
flyFocus
(
this
.
_fiCurrentFocus
,
this
.
_nodeEpisodeList
.
getChildByName
(
"EpisodeListCell0"
).
getComponent
(
FocusInfo
),
Common
.
MOVE_DIRECTION_LEFT
,
1.0
,
null
);
},
0
);
setTimeout
(
function
()
{
//在隐藏1.2秒焦点,
this
.
_cFocus
.
show
();
}.
bind
(
this
),
400
);
// cc.find("TopArea/Name/NormalName/MidName", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText1", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText2", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText1", nodeGatherDetailListCell).getComponent(cc.Label)._updateRenderData(true);
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText2", nodeGatherDetailListCell).getComponent(cc.Label)._updateRenderData(true);
// let fiBlock = nodeEpisodeListCell.getComponent(FocusInfo);
// fiBlock.setTVLink(
// '{"click":[{"action":"ChangeScene","parameters":{"sceneName":"scenePlayerFullScreen",\
// "appId":"' + this._strAppId + '","id":"' + this._iMediaId + '","episodeNum":"'+oJSONResult.resultSet[i].index+'",\
// "mediaCode":"'+oJSONResult.resultSet[i].code+'","name":"'+oJSONResult.resultSet[i].name+'"}}]}'
// );
}
},
doCurrentFocusTVLinkAction
:
function
(
strAction
)
{
let
strTVLink
=
this
.
_fiCurrentFocus
.
getTVLink
();
cc
.
log
(
"tvlink==============="
+
strTVLink
);
...
...
Please
register
or
sign in
to post a comment