Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_cocos_dqq
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
dfzx_cocos_dqq
Commits
b2b6dce7
Commit
b2b6dce7
authored
Mar 22, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bugs
parent
df7cd19f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
30 deletions
+40
-30
form.component.ts
form/src/app/form/form.component.ts
+1
-1
dfzx_cocos_dqq.fire
play/assets/dfzx_cocos_dqq/scene/dfzx_cocos_dqq.fire
+22
-22
dfzx_cocos_dqq.js
play/assets/dfzx_cocos_dqq/scene/dfzx_cocos_dqq.js
+14
-4
defaultData.js
play/assets/dfzx_cocos_dqq/script/defaultData.js
+3
-3
No files found.
form/src/app/form/form.component.ts
View file @
b2b6dce7
...
@@ -21,7 +21,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -21,7 +21,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
addQuestion
()
{
addQuestion
()
{
this
.
item
.
questionList
.
push
({
this
.
item
.
questionList
.
push
({
questionAudio
:
''
,
questionAudio
:
''
,
speedLevel
:
2
,
speedLevel
:
1
,
rigthNumber
:
5
,
rigthNumber
:
5
,
answerList
:
[]
answerList
:
[]
});
});
...
...
play/assets/dfzx_cocos_dqq/scene/dfzx_cocos_dqq.fire
View file @
b2b6dce7
...
@@ -1106,7 +1106,7 @@
...
@@ -1106,7 +1106,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
557,
557,
3
3
0,
3
0
0,
0,
0,
0,
0,
0,
0,
...
@@ -1175,7 +1175,7 @@
...
@@ -1175,7 +1175,7 @@
"_alignFlags": 33,
"_alignFlags": 33,
"_left": 0,
"_left": 0,
"_right": 50.5,
"_right": 50.5,
"_top":
3
0,
"_top":
6
0,
"_bottom": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
...
@@ -3103,7 +3103,7 @@
...
@@ -3103,7 +3103,7 @@
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 176,
"width": 176,
"height": 16
4
"height": 16
2
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -3247,7 +3247,7 @@
...
@@ -3247,7 +3247,7 @@
}
}
],
],
"_spriteFrame": null,
"_spriteFrame": null,
"_type":
1
,
"_type":
0
,
"_segments": 64,
"_segments": 64,
"_N$alphaThreshold": 0,
"_N$alphaThreshold": 0,
"_N$inverted": false,
"_N$inverted": false,
...
@@ -3782,7 +3782,7 @@
...
@@ -3782,7 +3782,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
f05W5JjmdFk7xuAgqQkcg3
"
"_id": "
b32fignA1E/ZHx1Ogc9aIC
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3817,7 +3817,7 @@
...
@@ -3817,7 +3817,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
b2+S45JnBLZLbWhO7q81l2
"
"_id": "
51w5xnPDZPu5aHqpFiXcJd
"
},
},
{
{
"__type__": "cc.RichText",
"__type__": "cc.RichText",
...
@@ -4315,8 +4315,8 @@
...
@@ -4315,8 +4315,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -4471,8 +4471,8 @@
...
@@ -4471,8 +4471,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -4627,8 +4627,8 @@
...
@@ -4627,8 +4627,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -4783,8 +4783,8 @@
...
@@ -4783,8 +4783,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -4939,8 +4939,8 @@
...
@@ -4939,8 +4939,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -5095,8 +5095,8 @@
...
@@ -5095,8 +5095,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -5251,8 +5251,8 @@
...
@@ -5251,8 +5251,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
@@ -5407,8 +5407,8 @@
...
@@ -5407,8 +5407,8 @@
0,
0,
-0.7071067811865475,
-0.7071067811865475,
0.7071067811865476,
0.7071067811865476,
1
,
0.5
,
1
,
0.5
,
1
1
]
]
},
},
...
...
play/assets/dfzx_cocos_dqq/scene/dfzx_cocos_dqq.js
View file @
b2b6dce7
...
@@ -168,7 +168,7 @@ cc.Class({
...
@@ -168,7 +168,7 @@ cc.Class({
const
BtnSpeaker
=
cc
.
find
(
'
Canvas/bg/BtnSpeaker
'
);
const
BtnSpeaker
=
cc
.
find
(
'
Canvas/bg/BtnSpeaker
'
);
addBtnListener
(
BtnSpeaker
,
async
()
=>
{
addBtnListener
(
BtnSpeaker
,
async
()
=>
{
await
this
.
playQuestionAudio
();
await
this
.
playQuestionAudio
();
}
,
this
.
playAudio
.
bind
(
this
,
'
btn
'
)
);
});
const
bg
=
cc
.
find
(
'
Canvas/bg
'
);
const
bg
=
cc
.
find
(
'
Canvas/bg
'
);
bg
.
on
(
'
touchstart
'
,
(
event
)
=>
{
bg
.
on
(
'
touchstart
'
,
(
event
)
=>
{
...
@@ -333,7 +333,7 @@ cc.Class({
...
@@ -333,7 +333,7 @@ cc.Class({
.
repeatForever
()
.
repeatForever
()
.
start
();
.
start
();
this
.
playAudio
(
'
appare
'
);
this
.
playAudio
(
'
appare
'
,
null
,
0.4
);
ball
.
on
(
'
touchstart
'
,
async
(
event
)
=>
{
ball
.
on
(
'
touchstart
'
,
async
(
event
)
=>
{
if
(
ball
.
canNotTouch
)
{
if
(
ball
.
canNotTouch
)
{
...
@@ -387,8 +387,18 @@ cc.Class({
...
@@ -387,8 +387,18 @@ cc.Class({
createTextBall
(
answer
)
{
createTextBall
(
answer
)
{
const
ball
=
cc
.
instantiate
(
cc
.
find
(
'
BallTxt
'
));
const
ball
=
cc
.
instantiate
(
cc
.
find
(
'
BallTxt
'
));
const
mask
=
cc
.
find
(
'
Mask
'
,
ball
);
const
text
=
cc
.
find
(
'
Mask/AnswerText
'
,
ball
);
const
text
=
cc
.
find
(
'
Mask/AnswerText
'
,
ball
);
text
.
getComponent
(
cc
.
RichText
).
string
=
`<color=#37397b>
${
answer
.
answerTxt
}
</color>`
;
text
.
getComponent
(
cc
.
RichText
).
string
=
`<color=#37397b>
${
answer
.
answerTxt
}
</color>`
;
cc
.
tween
(
text
)
.
delay
(
0
)
.
call
(()
=>
{
console
.
log
(
'
text =
'
+
answer
.
answerTxt
+
'
, text.width =
'
+
text
.
width
);
text
.
scale
=
Math
.
min
(
mask
.
width
/
text
.
width
,
1
);
})
.
start
();
return
ball
;
return
ball
;
},
},
...
@@ -505,10 +515,10 @@ cc.Class({
...
@@ -505,10 +515,10 @@ cc.Class({
await
asyncTweenTo
(
node
,
0.05
,
{
x
:
x
});
await
asyncTweenTo
(
node
,
0.05
,
{
x
:
x
});
},
},
playAudio
(
audioName
,
cb
)
{
playAudio
(
audioName
,
cb
,
value
=
0.8
)
{
const
audioNode
=
cc
.
find
(
`AudioBase/
${
audioName
}
`
);
const
audioNode
=
cc
.
find
(
`AudioBase/
${
audioName
}
`
);
const
audioClip
=
audioNode
.
getComponent
(
cc
.
AudioSource
).
clip
;
const
audioClip
=
audioNode
.
getComponent
(
cc
.
AudioSource
).
clip
;
const
id
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
const
id
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
value
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
if
(
cb
)
{
if
(
cb
)
{
cb
();
cb
();
...
...
play/assets/dfzx_cocos_dqq/script/defaultData.js
View file @
b2b6dce7
export
const
defaultData
=
{
export
const
defaultData
=
{
"
questionList
"
:
[{
"
questionList
"
:
[{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3
"
,
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3
"
,
"
speedLevel
"
:
2
,
"
speedLevel
"
:
1
,
"
rigthNumber
"
:
5
,
"
rigthNumber
"
:
5
,
"
answerList
"
:
[{
"
answerList
"
:
[{
"
answerAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3
"
,
"
answerAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3
"
,
...
@@ -12,7 +12,7 @@ export const defaultData = {
...
@@ -12,7 +12,7 @@ export const defaultData = {
},
},
{
{
"
answerAudio
"
:
""
,
"
answerAudio
"
:
""
,
"
answerTxt
"
:
"
cet
"
,
"
answerTxt
"
:
"
cet
tttttttttttttttt
"
,
"
answerImg
"
:
""
,
"
answerImg
"
:
""
,
"
answerType
"
:
"
txt
"
,
"
answerType
"
:
"
txt
"
,
"
rightAnswer
"
:
false
"
rightAnswer
"
:
false
...
@@ -41,7 +41,7 @@ export const defaultData = {
...
@@ -41,7 +41,7 @@ export const defaultData = {
},
},
{
{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.mp3
"
,
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.mp3
"
,
"
speedLevel
"
:
2
,
"
speedLevel
"
:
1
,
"
rigthNumber
"
:
5
,
"
rigthNumber
"
:
5
,
"
answerList
"
:
[{
"
answerList
"
:
[{
"
answerAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.mp3
"
,
"
answerAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.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