Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy04_pinci
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
hy04_pinci
Commits
204feca6
Commit
204feca6
authored
Jul 09, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hy04修改完成
parent
1d755afa
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
724 additions
and
334 deletions
+724
-334
LayerBack_hy04_pinci.ts
assets/hy04_pinci/common/layer_back/LayerBack_hy04_pinci.ts
+4
-0
layer_back_hy04_pinci.prefab
...hy04_pinci/common/layer_back/layer_back_hy04_pinci.prefab
+181
-33
layer_ending_hy04_pinci.ts
...hy04_pinci/common/layer_ending/layer_ending_hy04_pinci.ts
+6
-2
hy04_pinci.fire
assets/hy04_pinci/scene/hy04_pinci.fire
+438
-290
hy04_pinci.ts
assets/hy04_pinci/scene/hy04_pinci.ts
+25
-4
defaultData_hy04_pinci.ts
assets/hy04_pinci/script/defaultData_hy04_pinci.ts
+70
-5
No files found.
assets/hy04_pinci/common/layer_back/LayerBack_hy04_pinci.ts
View file @
204feca6
...
...
@@ -11,6 +11,7 @@ const { ccclass, property } = cc._decorator;
export
default
class
LayerBack
extends
cc
.
Component
{
private
btn_back
:
cc
.
Node
;
private
img_npc_voice
:
cc
.
Node
;
private
bg_forbid
:
cc
.
Node
;
onLoad
()
{
this
.
initView
();
this
.
initEvent
();
...
...
@@ -19,6 +20,7 @@ export default class LayerBack extends cc.Component {
initView
()
{
this
.
bg_forbid
=
pg
.
view
.
find
(
this
,
'
bg_forbid
'
)
this
.
btn_back
=
pg
.
view
.
find
(
this
,
'
btn_back
'
)
this
.
label_title
=
pg
.
view
.
find
(
this
,
'
label_title
'
)
this
.
img_npc_voice
=
pg
.
view
.
find
(
this
.
label_title
,
'
img_npc_voice
'
)
...
...
@@ -38,6 +40,7 @@ export default class LayerBack extends cc.Component {
pg
.
event
.
on
(
'
npc_layer_back_init
'
,
(
data
)
=>
{
this
.
updateView
(
data
);
if
(
!
this
.
npcAudio
)
{
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
);
}
else
{
this
.
playVoiceStart
();
...
...
@@ -55,6 +58,7 @@ export default class LayerBack extends cc.Component {
this
.
schedule
(
this
.
playVoiceRunning
,
0.3
)
pg
.
audio
.
playAudioByUrl
(
this
.
npcAudio
,
()
=>
{
this
.
playVoiceEnd
();
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
)
},
(
audioId
)
=>
{
this
.
audioId
=
audioId
;
...
...
assets/hy04_pinci/common/layer_back/layer_back_hy04_pinci.prefab
View file @
204feca6
...
...
@@ -21,20 +21,23 @@
"__id__": 2
},
{
"__id__": 7
"__id__": 6
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 2
2
"__id__": 2
7
},
{
"__id__": 2
3
"__id__": 2
8
}
],
"_prefab": {
"__id__": 2
4
"__id__": 2
9
},
"_opacity": 255,
"_color": {
...
...
@@ -85,7 +88,7 @@
},
{
"__type__": "cc.Node",
"_name": "b
tn_back
",
"_name": "b
g_forbid
",
"_objFlags": 0,
"_parent": {
"__id__": 1
...
...
@@ -98,13 +101,128 @@
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"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": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_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": ""
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "07DTTDThBNdJCrgpsUtJSh",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_back",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 8
},
{
"__id__":
5
"__id__":
9
}
],
"_prefab": {
"__id__":
6
"__id__":
10
},
"_opacity": 255,
"_color": {
...
...
@@ -158,7 +276,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
2
"__id__":
6
},
"_enabled": true,
"_materials": [
...
...
@@ -190,7 +308,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
2
"__id__":
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -258,7 +376,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
2
"__id__":
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -300,17 +418,20 @@
},
"_children": [
{
"__id__":
8
"__id__":
12
}
],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 24
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 2
1
"__id__": 2
6
},
"_opacity": 255,
"_color": {
...
...
@@ -364,27 +485,27 @@
"_name": "img_npc_voice",
"_objFlags": 0,
"_parent": {
"__id__":
7
"__id__":
11
},
"_children": [
{
"__id__":
9
"__id__":
13
},
{
"__id__": 1
2
"__id__": 1
6
},
{
"__id__": 1
5
"__id__": 1
9
}
],
"_active": true,
"_components": [
{
"__id__":
18
"__id__":
22
}
],
"_prefab": {
"__id__":
19
"__id__":
23
},
"_opacity": 255,
"_color": {
...
...
@@ -438,17 +559,17 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__":
8
"__id__":
12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
0
"__id__": 1
4
}
],
"_prefab": {
"__id__": 1
1
"__id__": 1
5
},
"_opacity": 255,
"_color": {
...
...
@@ -502,7 +623,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
9
"__id__":
13
},
"_enabled": true,
"_materials": [
...
...
@@ -545,17 +666,17 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__":
8
"__id__":
12
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 1
3
"__id__": 1
7
}
],
"_prefab": {
"__id__": 1
4
"__id__": 1
8
},
"_opacity": 255,
"_color": {
...
...
@@ -609,7 +730,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
6
},
"_enabled": true,
"_materials": [
...
...
@@ -652,17 +773,17 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__":
8
"__id__":
12
},
"_children": [],
"_active": false,
"_components": [
{
"__id__":
16
"__id__":
20
}
],
"_prefab": {
"__id__":
17
"__id__":
21
},
"_opacity": 255,
"_color": {
...
...
@@ -716,7 +837,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -759,7 +880,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
8
"__id__":
12
},
"_enabled": true,
"alignMode": 2,
...
...
@@ -797,7 +918,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
7
"__id__":
11
},
"_enabled": true,
"_materials": [
...
...
@@ -827,6 +948,33 @@
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 67.39999999999998,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
...
...
assets/hy04_pinci/common/layer_ending/layer_ending_hy04_pinci.ts
View file @
204feca6
...
...
@@ -21,7 +21,8 @@ export default class LayerEnding extends cc.Component {
pg
.
view
.
touchOn
(
this
.
replay_btn
,
this
.
onTouchReplay
,
this
)
pg
.
view
.
touchOn
(
this
.
next_btn
,
this
.
onTouchNext
,
this
)
pg
.
event
.
on
(
'
layer_ending_show
'
,
(
data
)
=>
{
this
.
showLayer
(
data
);
this
.
onTouchNext
();
// this.showLayer(data);
})
}
showLayer
(
data
)
{
...
...
@@ -42,9 +43,12 @@ export default class LayerEnding extends cc.Component {
}
onTouchNext
()
{
pg
.
view
.
visible
(
this
.
layer_center
,
false
)
console
.
log
(
"
下一题
"
);
pg
.
view
.
visible
(
this
.
layer_center
,
false
);
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
return
;
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
if
(
!
middleLayerComponent
)
return
;
const
{
index
,
length
}
=
middleLayerComponent
.
getPageInfo
();
// 返回 length:有多少页; index: 当前第几页(从0开始)
if
(
index
==
length
-
1
)
{
middleLayerComponent
.
goNextCross
();
// 跳转到下一关卡
...
...
assets/hy04_pinci/scene/hy04_pinci.fire
View file @
204feca6
This diff is collapsed.
Click to expand it.
assets/hy04_pinci/scene/hy04_pinci.ts
View file @
204feca6
...
...
@@ -36,12 +36,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this
.
initData
();
this
.
initView
();
this
.
initEvent
()
this
.
showWord
()
this
.
initEvent
();
this
.
showWordInit
();
pg
.
event
.
once
(
'
npc_voice_play_voice_end
'
,
()
=>
{
this
.
showWordStart
();
})
pg
.
event
.
emit
(
'
npc_layer_back_init
'
,
this
.
data
)
}
// 一轮单词数量
private
static
Word_List_Len
:
number
=
8
;
private
word_area
:
cc
.
Node
;
private
upper_shadow
:
cc
.
Node
;
private
lower_shadow
:
cc
.
Node
;
...
...
@@ -160,6 +163,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initWordBg
();
this
.
initWord
();
this
.
initQuestion
();
this
.
initQuestionVoice
();
}
showWordInit
()
{
this
.
wordBgList
=
[];
this
.
wordList
=
[];
this
.
successGroupIds
=
{};
pg
.
view
.
removChildren
(
this
.
word_area
)
this
.
initWordBg
();
this
.
initWord
();
this
.
initQuestion
();
}
showWordStart
()
{
this
.
initQuestionVoice
();
}
private
layer_question
:
cc
.
Node
;
initQuestion
()
{
...
...
@@ -171,6 +187,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
img_voice
.
active
=
this
.
CurrentWord
.
type
!=
"
img
"
;
if
(
img_voice
.
active
)
{
pg
.
view
.
touchOn
(
img_voice
,
this
.
onTouchVoice
,
this
);
}
}
initQuestionVoice
()
{
let
img_voice
=
pg
.
view
.
find
(
this
.
layer_question
,
'
img_voice
'
);
if
(
img_voice
.
active
)
{
this
.
onTouchVoice
({
target
:
img_voice
});
}
}
...
...
assets/hy04_pinci/script/defaultData_hy04_pinci.ts
View file @
204feca6
export
const
defaultData
=
{
"
onlineFlg
"
:
false
,
"
title
"
:
""
,
"
questionText
"
:
""
,
"
questionTextAudio
"
:
""
,
export
const
defaultData
=
{
"
onlineFlg
"
:
false
,
"
title
"
:
""
,
"
questionText
"
:
""
,
"
questionTextAudio
"
:
""
,
"
questions
"
:
[
{
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
imgVideo
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/5e2fd05e37c3f6694201049d244c58f0.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
letterList
"
:
[{
"
text
"
:
"
t
"
},
{
"
text
"
:
"
e
"
},
{
"
text
"
:
"
st
"
}],
"
audioName
"
:
"
create_hy11_paopao.mp3
"
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e184e067fc931d55fce93c9937a26c51.png
"
,
"
audio
"
:
""
,
"
text
"
:
""
,
"
right
"
:
false
,
"
letterList
"
:
[
{
"
text
"
:
"
m
"
},
{
"
text
"
:
"
o
"
},
{
"
text
"
:
"
n
"
},
{
"
text
"
:
"
k
"
},
{
"
text
"
:
"
e
"
},
{
"
text
"
:
"
y
"
}
]
},
{
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
imgVideo
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/84c53a0b9aac340ae396db7137847d51.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/1cf4664096cae0d4fb534f66a3861b6c_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
letterList
"
:
[{
"
text
"
:
"
f
"
},
{
"
text
"
:
"
u
"
},
{
"
text
"
:
"
nn
"
},
{
"
text
"
:
"
y
"
}],
"
audioName
"
:
"
error_hy11_paopao.mp3
"
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
,
"
titleTxt
"
:
"
test
"
,
"
undefined
"
:
"
create_hy11_paopao.mp3
"
,
"
titleAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3
"
,
"
npcTitle
"
:
"
test
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3
"
,
"
npcAudioName
"
:
"
create_hy11_paopao.mp3
"
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/e921b21c9ac22a623497b79cf849a421.png
"
,
"
audio
"
:
""
,
"
text
"
:
""
,
"
right
"
:
false
,
"
letterList
"
:
[
{
"
text
"
:
"
b
"
},
{
"
text
"
:
"
a
"
},
{
"
text
"
:
"
d
"
}
]
}
],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
,
"
npcTitle
"
:
""
,
"
npcAudio
"
:
""
,
"
npcAudioName
"
:
""
}
// {
// "onlineFlg": false, "title": "", "questionText": "", "questionTextAudio": "",
// "questions": [
// {
// "questionAudio": "", "duration": 120, "type": "imgVideo", "image": "http://staging-teach.cdn.ireadabc.com/5e2fd05e37c3f6694201049d244c58f0.png", "audio": "http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3", "text": "", "right": false, "letterList": [{ "text": "t" }, { "text": "e" }, { "text": "st" }], "audioName": "create_hy11_paopao.mp3"
// },
// {
// "questionAudio": "", "duration": 120, "type": "imgVideo", "image": "http://staging-teach.cdn.ireadabc.com/84c53a0b9aac340ae396db7137847d51.png", "audio": "http://staging-teach.cdn.ireadabc.com/1cf4664096cae0d4fb534f66a3861b6c_l.mp3", "text": "", "right": false, "letterList": [{ "text": "f" }, { "text": "u" }, { "text": "nn" }, { "text": "y" }], "audioName": "error_hy11_paopao.mp3"
// }], "bgAudio": "", "bgAudioName": "", "audioName": "", "titleTxt": "test", "undefined": "create_hy11_paopao.mp3", "titleAudio": "http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3", "npcTitle": "test", "npcAudio": "http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3", "npcAudioName": "create_hy11_paopao.mp3"
// }
// {
// "onlineFlg": false, "title": "钓鱼大作战", "questionText": "", "questionTextAudio": "http://staging-teach.cdn.ireadabc.com/e422c682ff3304a532937db64573caa4.mp3", "questions": [
...
...
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