Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
duiduipeng
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
duiduipeng
Commits
6bfa8451
Commit
6bfa8451
authored
May 02, 2022
by
章红平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
89fadf95
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
.DS_Store
.DS_Store
+0
-0
duiduipeng.fire
assets/duiduipeng/scene/duiduipeng.fire
+4
-4
duiduipeng.ts
assets/duiduipeng/scene/duiduipeng.ts
+15
-10
defaultData.ts
assets/duiduipeng/script/defaultData.ts
+2
-2
No files found.
.DS_Store
View file @
6bfa8451
No preview for this file type
assets/duiduipeng/scene/duiduipeng.fire
View file @
6bfa8451
...
...
@@ -3952,7 +3952,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height":
101.69999999999999
"height":
300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4003,8 +4003,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫",
"_N$string": "调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫",
"_string": "调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫
调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫
",
"_N$string": "调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫
调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫调皮的小猫
",
"_fontSize": 30,
"_lineHeight": 45,
"_enableWrapText": true,
...
...
@@ -4019,7 +4019,7 @@
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow":
3
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "02PI4U2/hJgZqv1PAsYkOL"
},
...
...
assets/duiduipeng/scene/duiduipeng.ts
View file @
6bfa8451
...
...
@@ -218,9 +218,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
else
{
if
(
numTime
<=
1
)
{
if
(
numTime
==
1
)
this
.
playLocalAudio
(
"
time1
"
)
if
(
numTime
==
1
)
this
.
playLocalAudio
(
"
time1
"
,
false
)
}
else
{
this
.
playLocalAudio
(
"
time2
"
)
this
.
playLocalAudio
(
"
time2
"
,
false
)
}
}
// }
...
...
@@ -305,10 +305,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
this
.
canTouch
=
false
if
(
this
.
clickNodeData1
.
pairIdx
==
data
.
pairIdx
)
{
this
.
asyncPlayAudioByUrl
(
data
.
audio
)
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
()
,
this
.
asyncPlayAudioByUrl
(
data
.
audio
)
])
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
()])
.
then
(()
=>
{
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
playDragon
(),
this
.
clickNode1
.
getComponent
(
"
card
"
).
playDragon
(),
this
.
playLocalAudio
(
"
true
"
)])
this
.
playLocalAudio
(
"
true
"
)
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
playDragon
(),
this
.
clickNode1
.
getComponent
(
"
card
"
).
playDragon
()])
.
then
(()
=>
{
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
doHide
(),
this
.
clickNode1
.
getComponent
(
"
card
"
).
doHide
()])
.
then
(()
=>
{
...
...
@@ -337,18 +339,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
)
}
else
{
this
.
asyncPlayAudioByUrl
(
data
.
audio
)
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
()
,
this
.
asyncPlayAudioByUrl
(
data
.
audio
)
])
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
()])
.
then
(()
=>
{
Promise
.
all
([
this
.
playLocalAudio
(
"
false
"
)])
.
then
(()
=>
{
this
.
playLocalAudio
(
"
false
"
)
// Promise.all([this.playLocalAudio("false")])
// .then(() => {
Promise
.
all
([
node
.
getComponent
(
"
card
"
).
asyncDoFlip
(),
this
.
clickNode1
.
getComponent
(
"
card
"
).
asyncDoFlip
()])
.
then
(()
=>
{
this
.
canTouch
=
true
;
this
.
clickNode1
=
null
this
.
clickNodeData1
=
null
;
})
})
//
})
}
)
}
...
...
@@ -397,10 +401,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
}
playLocalAudio
(
audioName
)
{
playLocalAudio
(
audioName
,
stopAll
=
true
)
{
const
audio
=
cc
.
find
(
`Canvas/res/audio/
${
audioName
}
`
).
getComponent
(
cc
.
AudioSource
);
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
audioEngine
.
stopAll
();
if
(
stopAll
)
cc
.
audioEngine
.
stopAll
();
const
id
=
cc
.
audioEngine
.
playEffect
(
audio
.
clip
,
false
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
resolve
(
id
);
...
...
assets/duiduipeng/script/defaultData.ts
View file @
6bfa8451
...
...
@@ -3,8 +3,8 @@ export const defaultData = {
questionText
:
"
题目说明题目说明题目说明题目说明题目说明题目说明题目说明
"
,
questionTextAudio
:
"
http://staging-teach.cdn.ireadabc.com/92ddbc65e9af775f7a8450a5bef1a732.mp3
"
,
questions
:
[{
watchTime
:
10
,
// 看题时间(秒)
gameTime
:
3
0
,
// 游戏时间(秒)
watchTime
:
5
,
// 看题时间(秒)
gameTime
:
1
0
,
// 游戏时间(秒)
options
:
[{
pairIdx
:
1
,
audio
:
"
http://staging-teach.cdn.ireadabc.com/ce3337620f22232dd15c29c66af57736.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