Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy07_tiankong
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
hy07_tiankong
Commits
97285f9a
Commit
97285f9a
authored
Sep 19, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e2e480f0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
807 additions
and
341 deletions
+807
-341
img_voice_hy07_tiankong.prefab
...y07_tiankong/common/prefab/img_voice_hy07_tiankong.prefab
+7
-7
hy07_tiankong.fire
assets/hy07_tiankong/scene/hy07_tiankong.fire
+777
-328
hy07_tiankong.ts
assets/hy07_tiankong/scene/hy07_tiankong.ts
+21
-4
defaultData_hy07_tiankong.ts
assets/hy07_tiankong/script/defaultData_hy07_tiankong.ts
+2
-2
No files found.
assets/hy07_tiankong/common/prefab/img_voice_hy07_tiankong.prefab
View file @
97285f9a
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 0,
"width":
15
0,
"height": 0
"height":
15
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
"__id__": 1
"__id__": 1
},
},
"asset": {
"asset": {
"__
id__": 0
"__
uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
},
"fileId": "b2AVtPfI1H8rsYBg+57NsK",
"fileId": "b2AVtPfI1H8rsYBg+57NsK",
"sync": false
"sync": false
...
@@ -295,7 +295,7 @@
...
@@ -295,7 +295,7 @@
"__id__": 1
"__id__": 1
},
},
"asset": {
"asset": {
"__
id__": 0
"__
uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
},
"fileId": "28xDtc6+BJ74MCN73DdTk4",
"fileId": "28xDtc6+BJ74MCN73DdTk4",
"sync": false
"sync": false
...
@@ -402,7 +402,7 @@
...
@@ -402,7 +402,7 @@
"__id__": 1
"__id__": 1
},
},
"asset": {
"asset": {
"__
id__": 0
"__
uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
},
"fileId": "3bzotBPcdH6KRt6Og7x6F9",
"fileId": "3bzotBPcdH6KRt6Og7x6F9",
"sync": false
"sync": false
...
@@ -435,7 +435,7 @@
...
@@ -435,7 +435,7 @@
"_id": ""
"_id": ""
},
},
{
{
"__type__": "
f6509JnLAlKfZ9VLFWlQcNk
",
"__type__": "
8fa11v2FMRF5aYUQ2xw3/ss
",
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
...
@@ -450,7 +450,7 @@
...
@@ -450,7 +450,7 @@
"__id__": 1
"__id__": 1
},
},
"asset": {
"asset": {
"__
id__": 0
"__
uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
},
"fileId": "",
"fileId": "",
"sync": false
"sync": false
...
...
assets/hy07_tiankong/scene/hy07_tiankong.fire
View file @
97285f9a
This diff is collapsed.
Click to expand it.
assets/hy07_tiankong/scene/hy07_tiankong.ts
View file @
97285f9a
...
@@ -115,8 +115,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -115,8 +115,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
event
.
on
(
"
layer_record_score
"
,
(
score
)
=>
{
pg
.
event
.
on
(
"
layer_record_score
"
,
(
score
)
=>
{
});
});
pg
.
event
.
on
(
'
npc_voice_play_voice_end
'
,
()
=>
{
pg
.
event
.
on
(
'
npc_voice_play_voice_end
'
,
async
()
=>
{
asyncDelay
(
0.3
);
this
.
playQuestAudio
();
})
})
pg
.
event
.
emit
(
'
npc_layer_back_init
'
,
this
.
data
)
pg
.
event
.
emit
(
'
npc_layer_back_init
'
,
this
.
data
)
...
@@ -149,6 +150,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -149,6 +150,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
pic_light
=
cc
.
find
(
"
pic_light
"
,
node
.
parent
);
let
pic_light
=
cc
.
find
(
"
pic_light
"
,
node
.
parent
);
if
(
pic_light
)
pic_light
.
active
=
false
;
if
(
pic_light
)
pic_light
.
active
=
false
;
});
});
cc
.
find
(
"
img_voice
"
,
this
.
node
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
()
=>
{
this
.
playQuestAudio
();
})
}
}
sendData
(
score
)
{
sendData
(
score
)
{
...
@@ -175,11 +179,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -175,11 +179,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initData
();
this
.
initData
();
this
.
initView
();
this
.
initView
();
}
}
private
playQuestAudio
()
{
cc
.
audioEngine
.
stopAllEffects
();
let
question
=
Game
.
getIns
().
getCurrentPage
();
if
(
question
.
audioUrl
!=
""
)
{
pg
.
event
.
emit
(
"
img_voice_play_voice_start
"
);
pg
.
audio
.
playAudioByUrl
(
question
.
audioUrl
).
then
(
async
()
=>
{
this
.
isClick
=
true
;
pg
.
event
.
emit
(
"
img_voice_play_voice_end
"
);
})
}
else
{
this
.
isClick
=
true
;
}
}
private
playOpAudio
()
{
private
playOpAudio
()
{
let
question
=
Game
.
getIns
().
getCurrentPage
();
let
question
=
Game
.
getIns
().
getCurrentPage
();
if
(
question
.
audioUrl
!=
""
)
{
if
(
question
.
audioUrl
!=
""
)
{
pg
.
event
.
emit
(
"
img_voice_play_voice_start
"
);
pg
.
audio
.
playAudioByUrl
(
question
.
audioUrl
).
then
(
async
()
=>
{
pg
.
audio
.
playAudioByUrl
(
question
.
audioUrl
).
then
(
async
()
=>
{
pg
.
event
.
emit
(
"
img_voice_play_voice_end
"
);
await
asyncDelay
(
0.5
);
await
asyncDelay
(
0.5
);
pg
.
event
.
emit
(
"
layer_right_show_excellent
"
);
pg
.
event
.
emit
(
"
layer_right_show_excellent
"
);
})
})
...
@@ -294,7 +312,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -294,7 +312,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
await
asyncDelay
(
0.03
);
await
asyncDelay
(
0.03
);
box_up
.
active
=
isBig
;
box_up
.
active
=
isBig
;
this
.
isClick
=
true
;
if
(
isBig
&&
this
.
layout_up
.
width
<
this
.
layout_down
.
width
)
{
if
(
isBig
&&
this
.
layout_up
.
width
<
this
.
layout_down
.
width
)
{
this
.
layout_up
.
getComponent
(
cc
.
Layout
).
enabled
=
false
;
this
.
layout_up
.
getComponent
(
cc
.
Layout
).
enabled
=
false
;
this
.
layout_up
.
width
=
this
.
layout_down
.
width
;
this
.
layout_up
.
width
=
this
.
layout_down
.
width
;
...
...
assets/hy07_tiankong/script/defaultData_hy07_tiankong.ts
View file @
97285f9a
...
@@ -24,8 +24,8 @@ export const defaultData = {
...
@@ -24,8 +24,8 @@ export const defaultData = {
"
check
"
:
1
"
check
"
:
1
}
}
],
],
"
audio
"
:
""
,
//
"audio": "",
//
"audio": "http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3",
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3
"
,
"
contentMain
"
:
"
what is
\n
your name?
"
,
"
contentMain
"
:
"
what is
\n
your name?
"
,
"
text
"
:
""
,
"
text
"
:
""
,
"
audioName
"
:
"
bear_1.mp3
"
"
audioName
"
:
"
bear_1.mp3
"
...
...
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