Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP05
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
OP05
Commits
96a235f0
Commit
96a235f0
authored
Sep 24, 2021
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字体加入 流程完成 待增加失败重试等
parent
dd2e95ee
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
523 additions
and
535 deletions
+523
-535
MuliBoldYzEVy.ttf
play/assets/scene/fonts/MuliBoldYzEVy.ttf
+0
-0
MuliBoldYzEVy.ttf.meta
play/assets/scene/fonts/MuliBoldYzEVy.ttf.meta
+5
-0
progressauto.js
play/assets/scene/scene/progressauto.js
+2
-3
scene.fire
play/assets/scene/scene/scene.fire
+444
-521
scene.js
play/assets/scene/scene/scene.js
+72
-11
No files found.
play/assets/scene/fonts/MuliBoldYzEVy.ttf
0 → 100644
View file @
96a235f0
File added
play/assets/scene/fonts/MuliBoldYzEVy.ttf.meta
0 → 100644
View file @
96a235f0
{
"ver": "1.1.0",
"uuid": "04c2b808-1c8a-499b-9152-128a1abe340a",
"subMetas": {}
}
\ No newline at end of file
play/assets/scene/scene/progressauto.js
View file @
96a235f0
...
...
@@ -3,6 +3,7 @@ cc.Class({
extends
:
cc
.
Component
,
properties
:
{
costtime
:
4
,
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
...
...
@@ -39,10 +40,8 @@ cc.Class({
updateTime
()
{
let
progressBar
=
pg
.
view
.
findComponent
(
this
,
cc
.
ProgressBar
);
progressBar
.
progress
=
progressBar
.
progress
+
(
1
/
(
1000
/
30
)
/
4
);
progressBar
.
progress
=
progressBar
.
progress
+
(
1
/
(
1000
/
30
)
/
this
.
costtime
);
},
update
(
dt
)
{
//1 60 2000 1
},
...
...
play/assets/scene/scene/scene.fire
View file @
96a235f0
This diff is collapsed.
Click to expand it.
play/assets/scene/scene/scene.js
View file @
96a235f0
...
...
@@ -188,8 +188,8 @@ cc.Class({
let
icon_ex
=
pg
.
view
.
find
(
this
,
"
icon_ex
"
);
let
btn_next
=
pg
.
view
.
find
(
this
,
"
btn_next
"
);
let
btn_return
=
pg
.
view
.
find
(
this
,
"
btn_return
"
);
let
icon_ex_last
=
pg
.
view
.
find
(
icon_ex
,
"
last
"
);
let
icon_ex_
first
=
pg
.
view
.
find
(
icon_ex_last
,
"
firs
t
"
);
let
icon_ex_
txt
=
pg
.
view
.
find
(
icon_ex
,
"
tx
t
"
);
let
icon_hand
=
pg
.
view
.
find
(
this
,
"
icon_hand
"
);
let
btn_picture
=
pg
.
view
.
find
(
this
,
"
btn_picture
"
);
...
...
@@ -212,20 +212,21 @@ cc.Class({
let
bg_book_img
=
this
.
_stageData
.
img
;
//从数组中调取img数据
pg
.
view
.
setNetImg
(
bg_book
,
bg_book_img
);
//与界面的节点绑定
//拓展加载动画的内容
this
.
animationName
=
""
;
pg
.
view
.
loadDB
(
carton
,
{
ske
:
this
.
_stageData
.
cartoonSke
,
tex
:
this
.
_stageData
.
cartoonTex
,
png
:
this
.
_stageData
.
cartoonPng
}).
then
((
animationName
)
=>
{
let
dragonDisplay
=
carton
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
dragonDisplay
.
playAnimation
(
animationName
,
1
);
//animation所有的动画名称
this
.
animationName
=
animationName
;
GameManager
.
getIns
().
setState
(
1
);
this
.
initLayout
()
//完成后直接进入下一步
})
}
else
if
(
GameManager
.
getIns
().
getState
()
==
1
)
{
let
dragonDisplay
=
carton
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
dragonDisplay
.
playAnimation
(
this
.
animationName
,
1
);
//animation所有的动画名称
// 动画结束后,出现单词,同时播放音频-----缺少单词放大效果
setTimeout
(()
=>
{
pg
.
view
.
visible
(
icon_ex
,
true
);
let
icon_ex_word
=
this
.
_stageData
.
word
;
pg
.
view
.
setString
(
icon_ex_first
,
icon_ex_word
[
0
]);
pg
.
view
.
setString
(
icon_ex_last
,
icon_ex_word
);
this
.
wordAni
(
icon_ex_txt
,
icon_ex_word
)
pg
.
audio
.
playAudioByUrl
(
this
.
_stageData
.
sound
);
},
1000
*
2
);
setTimeout
(()
=>
{
...
...
@@ -248,10 +249,6 @@ cc.Class({
pg
.
view
.
visible
(
btn_replay
,
false
);
pg
.
view
.
visible
(
btn_recording
,
true
);
pg
.
view
.
visible
(
progress
,
true
);
setTimeout
(()
=>
{
GameManager
.
getIns
().
setState
(
3
);
this
.
initLayout
()
},
1000
*
4
);
//4秒钟之后进入下一步
}
else
if
(
GameManager
.
getIns
().
getState
()
==
3
)
{
pg
.
view
.
visible
(
btn_record
,
true
);
pg
.
view
.
visible
(
btn_recording
,
false
);
...
...
@@ -275,17 +272,80 @@ cc.Class({
this
.
playSFX
(
"
audio_finish
"
);
pg
.
view
.
visible
(
btn_picture
,
true
);
pg
.
view
.
visible
(
btn_record
,
false
);
onHomeworkFinish
&&
onHomeworkFinish
();
}
else
if
(
GameManager
.
getIns
().
getState
()
==
6
)
{
}
},
wordAni
(
item
,
content
)
{
let
itemfirst
=
pg
.
view
.
find
(
item
,
"
first
"
);
//动态居中算法。
//锚点在中间,左右延长,第一个字不去显示
let
contentArr
=
content
.
split
(
""
);
let
s0
=
contentArr
.
shift
();
let
s1
=
contentArr
.
join
(
""
);
//首字母变大
let
str1
=
`<size=150><color=#ffffff>
${
s0
}
</color></size><color=#0000>
${
s1
}
</color>`
let
strfirst1
=
`<size=150><color=#fc4a4a>
${
s0
}
</color></size>`
;
item
.
getComponent
(
cc
.
RichText
).
string
=
str1
;
itemfirst
.
y
=
17
;
itemfirst
.
getComponent
(
cc
.
RichText
).
string
=
strfirst1
;
setTimeout
(()
=>
{
//全部变大
let
str2
=
`<size=150><color=#ffffff>
${
s0
}
</color><color=#0000>
${
s1
}
</color></size>`
itemfirst
.
y
=
0
;
item
.
getComponent
(
cc
.
RichText
).
string
=
str2
;
},
1100
);
},
//按钮触发,使用的方法
onTouchRecord
()
{
this
.
playSFX
(
"
audio_btns
"
);
GameManager
.
getIns
().
setState
(
2
);
this
.
initLayout
()
window
.
courseware
&&
window
.
courseware
.
startTest
(
this
.
_stageData
.
word
);
//开始录音
setTimeout
(()
=>
{
if
(
1
)
return
this
.
recrodEnd
({
"
dtLastResponse
"
:
"
2021-09-17 13:36:26:109
"
,
"
refText
"
:
"
I haven't found anything out about him yet.
"
,
"
recordId
"
:
"
6144295213f0a2200000ed93
"
,
"
eof
"
:
1
,
"
result
"
:
{
"
pronunciation
"
:
75
,
"
resource_version
"
:
"
3.1.0
"
,
"
fluency
"
:
60
,
"
rhythm
"
:
90
,
"
kernel_version
"
:
"
5.2.4
"
,
"
overall
"
:
74
,
"
integrity
"
:
100
,
"
duration
"
:
"
6.779
"
,
"
rear_tone
"
:
"
fall
"
,
"
speed
"
:
96
,
},
"
tokenId
"
:
"
6144295408558b08dd000001
"
,
"
applicationId
"
:
"
154838659000009e
"
})
window
.
courseware
&&
window
.
courseware
.
stopTest
((
data
)
=>
{
this
.
recrodEnd
(
data
);
});
//结束录音
},
4000
);
},
recrodEnd
(
data
)
{
let
score
=
data
.
result
.
overall
;
// score = 40;
if
(
score
>
50
)
{
GameManager
.
getIns
().
setState
(
3
);
this
.
initLayout
();
}
else
{
GameManager
.
getIns
().
setState
(
4
);
this
.
initLayout
();
}
},
onTouchNext
()
{
this
.
playSFX
(
"
audio_btns
"
);
...
...
@@ -301,7 +361,8 @@ cc.Class({
},
onTouchReplay
()
{
this
.
playSFX
(
"
audio_btns
"
);
GameManager
.
getIns
().
setState
(
1
);
this
.
initLayout
()
},
onTouchPicture
()
{
this
.
playSFX
(
"
audio_btns
"
);
...
...
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