Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NS03
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
NS03
Commits
1cbf5ebb
Commit
1cbf5ebb
authored
Jan 02, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改点击区域
parent
5880e010
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
311 additions
and
203 deletions
+311
-203
NS03.fire
assets/NS03/scene/NS03.fire
+291
-194
item.ts
assets/NS03/scene/item.ts
+2
-1
speak.ts
assets/NS03/scene/speak.ts
+18
-8
No files found.
assets/NS03/scene/NS03.fire
View file @
1cbf5ebb
This diff is collapsed.
Click to expand it.
assets/NS03/scene/item.ts
View file @
1cbf5ebb
...
@@ -27,7 +27,8 @@ export default class NewClass extends cc.Component {
...
@@ -27,7 +27,8 @@ export default class NewClass extends cc.Component {
this
.
txt
=
pg
.
view
.
find
(
this
.
panel_text
,
"
txt
"
);
this
.
txt
=
pg
.
view
.
find
(
this
.
panel_text
,
"
txt
"
);
this
.
right
=
pg
.
view
.
find
(
this
.
panel_text
,
"
right
"
);
this
.
right
=
pg
.
view
.
find
(
this
.
panel_text
,
"
right
"
);
this
.
img
=
pg
.
view
.
find
(
this
.
panel_text
,
"
img
"
);
this
.
img
=
pg
.
view
.
find
(
this
.
panel_text
,
"
img
"
);
pg
.
view
.
touchOn
(
this
.
panel_text
,
this
.
onPlayerText
,
this
);
let
btn_touch
=
pg
.
view
.
find
(
this
,
"
btn_touch
"
);
pg
.
view
.
touchOn
(
btn_touch
,
this
.
onPlayerText
,
this
);
}
}
private
data
:
any
;
private
data
:
any
;
...
...
assets/NS03/scene/speak.ts
View file @
1cbf5ebb
...
@@ -8,7 +8,11 @@
...
@@ -8,7 +8,11 @@
import
pg
from
"
./pg
"
;
import
pg
from
"
./pg
"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
BTN_STATE
=
{
WAIT
:
1
,
START
:
2
,
END
:
3
,
}
@
ccclass
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
export
default
class
NewClass
extends
cc
.
Component
{
...
@@ -56,16 +60,18 @@ export default class NewClass extends cc.Component {
...
@@ -56,16 +60,18 @@ export default class NewClass extends cc.Component {
private
tryCount
:
number
;
private
tryCount
:
number
;
private
val
:
string
;
private
val
:
string
;
private
tipId
:
any
;
private
tipId
:
any
;
private
btnState
:
number
;
open
(
value
)
{
open
(
value
)
{
pg
.
hw
.
playLocalAudio
(
"
tips
"
).
then
(
id
=>
{
pg
.
hw
.
playLocalAudio
(
"
tips
"
).
then
(
id
=>
{
this
.
tipId
=
id
;
this
.
tipId
=
id
;
this
.
btnState
=
BTN_STATE
.
WAIT
;
this
.
val
=
value
;
pg
.
view
.
visible
(
this
.
btn_audio_start
,
true
);
pg
.
view
.
visible
(
this
.
btn_audio_stop
,
false
);
pg
.
view
.
visible
(
this
.
speak_ske
,
true
);
pg
.
view
.
visible
(
this
.
bg_goodjob
,
false
);
pg
.
view
.
visible
(
this
.
bg_tryagain
,
false
);
})
})
this
.
val
=
value
;
pg
.
view
.
visible
(
this
.
btn_audio_start
,
true
);
pg
.
view
.
visible
(
this
.
btn_audio_stop
,
false
);
pg
.
view
.
visible
(
this
.
speak_ske
,
true
);
pg
.
view
.
visible
(
this
.
bg_goodjob
,
false
);
pg
.
view
.
visible
(
this
.
bg_tryagain
,
false
);
}
}
close
()
{
close
()
{
pg
.
view
.
visible
(
this
.
btn_audio_start
,
false
);
pg
.
view
.
visible
(
this
.
btn_audio_start
,
false
);
...
@@ -76,6 +82,8 @@ export default class NewClass extends cc.Component {
...
@@ -76,6 +82,8 @@ export default class NewClass extends cc.Component {
}
}
onTouchStart
()
{
onTouchStart
()
{
if
(
this
.
btnState
!=
BTN_STATE
.
WAIT
)
return
;
this
.
btnState
=
BTN_STATE
.
START
;
if
(
this
.
tipId
)
{
if
(
this
.
tipId
)
{
pg
.
audio
.
stopAudio
(
this
.
tipId
);
pg
.
audio
.
stopAudio
(
this
.
tipId
);
this
.
tipId
=
null
;
this
.
tipId
=
null
;
...
@@ -88,6 +96,8 @@ export default class NewClass extends cc.Component {
...
@@ -88,6 +96,8 @@ export default class NewClass extends cc.Component {
win
.
courseware
&&
win
.
courseware
.
startTest
(
this
.
val
);
//开始录音
win
.
courseware
&&
win
.
courseware
.
startTest
(
this
.
val
);
//开始录音
}
}
onTouchStop
()
{
onTouchStop
()
{
if
(
this
.
btnState
!=
BTN_STATE
.
START
)
return
;
this
.
btnState
=
BTN_STATE
.
END
;
pg
.
view
.
visible
(
this
.
btn_audio_start
,
false
);
pg
.
view
.
visible
(
this
.
btn_audio_start
,
false
);
pg
.
view
.
visible
(
this
.
btn_audio_stop
,
false
);
pg
.
view
.
visible
(
this
.
btn_audio_stop
,
false
);
let
win
:
any
=
window
;
let
win
:
any
=
window
;
...
@@ -104,7 +114,7 @@ export default class NewClass extends cc.Component {
...
@@ -104,7 +114,7 @@ export default class NewClass extends cc.Component {
"
fluency
"
:
60
,
"
fluency
"
:
60
,
"
rhythm
"
:
90
,
"
rhythm
"
:
90
,
"
kernel_version
"
:
"
5.2.4
"
,
"
kernel_version
"
:
"
5.2.4
"
,
"
overall
"
:
75
,
//75
"
overall
"
:
20
,
//75
"
integrity
"
:
100
,
"
integrity
"
:
100
,
"
duration
"
:
"
6.779
"
,
"
duration
"
:
"
6.779
"
,
"
rear_tone
"
:
"
fall
"
,
"
rear_tone
"
:
"
fall
"
,
...
...
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