Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kyxq_qpy
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
kyxq_qpy
Commits
d8fc1375
Commit
d8fc1375
authored
Oct 24, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
7f90f7d7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
876 additions
and
265 deletions
+876
-265
rolling.mp3
assets/kyxq_qpy/audio/rolling.mp3
+0
-0
rolling.mp3.meta
assets/kyxq_qpy/audio/rolling.mp3.meta
+7
-0
kyxq_qpy.fire
assets/kyxq_qpy/scene/kyxq_qpy.fire
+763
-216
kyxq_qpy.js
assets/kyxq_qpy/scene/kyxq_qpy.js
+106
-49
No files found.
assets/kyxq_qpy/audio/rolling.mp3
0 → 100644
View file @
d8fc1375
File added
assets/kyxq_qpy/audio/rolling.mp3.meta
0 → 100644
View file @
d8fc1375
{
"ver": "2.0.1",
"uuid": "a4e7516c-7a9a-4403-bf15-94250bff5888",
"downloadMode": 0,
"duration": 0.156735,
"subMetas": {}
}
\ No newline at end of file
assets/kyxq_qpy/scene/kyxq_qpy.fire
View file @
d8fc1375
This diff is collapsed.
Click to expand it.
assets/kyxq_qpy/scene/kyxq_qpy.js
View file @
d8fc1375
...
...
@@ -718,6 +718,7 @@ cc.Class({
audioGoodjob
:
null
,
audioTryagain
:
null
,
audioRolling
:
null
,
initAudioEffect
()
{
const
audioNode
=
cc
.
find
(
'
Canvas/res/audio
'
);
...
...
@@ -728,6 +729,8 @@ cc.Class({
this
.
audioGoodjob
=
getAudioByResName
(
'
goodjob
'
);
this
.
audioTryagain
=
getAudioByResName
(
'
tryagain
'
);
this
.
audioRolling
=
getAudioByResName
(
'
rolling
'
);
},
...
...
@@ -973,7 +976,7 @@ cc.Class({
svNode
.
y
=
-
topH
/
2
// 100 * this._mapScaleMin;
svNode
.
x
=
this
.
canvas
.
width
/
4
+
10
*
this
.
_mapScaleMin
;
// - (item.width / 2 + 10) * this._mapScaleMin;
svNode
.
x
=
this
.
canvas
.
width
/
4
.5
+
10
*
this
.
_mapScaleMin
;
// - (item.width / 2 + 10) * this._mapScaleMin;
svNode
.
scale
=
this
.
_mapScaleMin
;
...
...
@@ -986,8 +989,8 @@ cc.Class({
this
.
recordItemArr
=
[];
const
baseX
=
0
//this.canvas.width/2 - 300 * this._mapScaleMin;
const
baseY
=
-
item
.
height
/
2
;
// item.height / 2 // this.canvas.height / 2 - 200 * this._mapScaleMin
;
const
disH
=
item
.
height
+
20
;
const
disH
=
item
.
height
+
50
;
const
baseY
=
-
item
.
height
/
2
-
35
;
// item.height / 2 // this.canvas.height / 2 - 200 * this._mapScaleMin
;
let
h
=
0
;
let
count
=
0
;
...
...
@@ -1078,6 +1081,7 @@ cc.Class({
// }
console
.
log
(
'
targetY :
'
,
targetY
);
this
.
sv
.
scrollToOffset
(
cc
.
v2
(
0
,
-
item
.
y
-
item
.
height
/
2
*
3
),
0.5
);
playAudio
(
this
.
audioRolling
.
clip
);
})
},
...
...
@@ -1409,6 +1413,8 @@ cc.Class({
item
.
addChild
(
progress
);
item
.
progressComp
=
progress
.
getComponent
(
cc
.
ProgressBar
);
item
.
progressComp
.
progress
=
0
;
// item.progressJs = progress.getComponent('OP_06_3_myProgressScript');
const
timeLabel
=
this
.
getLabel
();
...
...
@@ -1450,18 +1456,18 @@ cc.Class({
const
recordIcon
=
getSprNode
(
'
icon_record_normal
'
);
recordBtnNode
.
addChild
(
recordIcon
);
const
recordAnim
=
getSprNode
(
'
icon_recording
'
);
// const recordAnim = this.getAnim('record');
const
soundProgressBase
=
cc
.
find
(
"
Canvas/res/progress/soundProgressBar
"
)
const
soundProgressNode
=
cc
.
instantiate
(
soundProgressBase
);
soundProgressNode
.
parent
=
recordBtnNode
;
// recordAnim.scale = 0.8;
// recordAnim.x = -0.1;
recordAnim
.
y
=
3.5
;
// const anim = recordAnim.getComponent(cc.Animation);
// anim.play();
recordBtnNode
.
addChild
(
recordAnim
);
recordAnim
.
active
=
false
;
// const recordAnim = getSprNode('icon_recording');
// recordAnim.y = 3.5;
// recordBtnNode.addChild(recordAnim);
// recordAnim.active = false;
...
...
@@ -1475,7 +1481,10 @@ cc.Class({
item
.
playIcon
=
playBtn
;
item
.
pauseIcon
=
stopBtn
;
item
.
recordEndIcon
=
recordIcon
;
item
.
recordStartIcon
=
recordAnim
;
item
.
recordStartIcon
=
soundProgressNode
;
item
.
soundProgress
=
soundProgressNode
.
getComponent
(
cc
.
ProgressBar
);
// item.listenBtn = listenBtn;
item
.
listenBtn
=
playBtnNode
;
...
...
@@ -1567,6 +1576,7 @@ cc.Class({
this
.
isRecord
=
true
;
this
.
refreshRecordBtnState
(
item
);
item
.
soundProgress
.
progress
=
0
;
this
.
curRecordItem
=
item
;
...
...
@@ -1713,16 +1723,16 @@ cc.Class({
serverStopTest
(
item
)
{
//
const tmpData = {
//
refText: 'ant apple alligator ax.',
// audio_u
rl: 'https://staging-teach.cdn.ireadabc.com/f01f0d63c0c4c0dd1203a6202ecaf34b.wav',
//
result:{
//
overall: 49,
//
}
//
}
const
tmpData
=
{
refText
:
'
ant apple alligator ax.
'
,
audioU
rl
:
'
https://staging-teach.cdn.ireadabc.com/f01f0d63c0c4c0dd1203a6202ecaf34b.wav
'
,
result
:{
overall
:
49
,
}
}
//
this.setRecordItemAudio(tmpData, item);
//
return;
this
.
setRecordItemAudio
(
tmpData
,
item
);
return
;
const
cw
=
window
?.
courseware
if
(
cw
)
{
...
...
@@ -1792,7 +1802,7 @@ cc.Class({
item
.
starCount
=
count
;
this
.
showStar
(
item
,
count
);
this
.
showStar
(
item
,
count
,
score
);
this
.
showListenBtn
(
item
);
...
...
@@ -1863,10 +1873,13 @@ cc.Class({
showStar
(
item
,
count
)
{
if
(
!
item
.
starLayer
)
{
this
.
initItemStarLayer
(
item
);
}
showStar
(
item
,
count
,
score
)
{
// if (!item.starLayer) {
// this.initItemStarLayer(item);
// }
const
starShowEnd
=
()
=>
{
this
.
isStarShowEnd
=
true
;
...
...
@@ -1884,10 +1897,10 @@ cc.Class({
this
.
isShowFightAudio
=
true
;
this
.
canTouch
=
false
;
console
.
log
(
"
禁止点击 - 4
"
)
this
.
playAni
(
'
begin
'
,
0
);
//
this.playAni('begin', 0);
this
.
needEnableTouchOnStopAudio
=
true
;
playAudioByUrl
(
this
.
data
.
fight_audio_url
,
()
=>
{
this
.
playAni
(
'
normal
'
,
0
);
//
this.playAni('normal', 0);
this
.
needEnableTouchOnStopAudio
=
false
;
if
(
this
.
isDestroy
)
{
...
...
@@ -1903,39 +1916,74 @@ cc.Class({
}
}
if
(
count
>=
2
)
{
this
.
playAni
(
'
begin
'
,
0
);
let
resName
;
if
(
score
>=
60
)
{
resName
=
"
bg_gj
"
;
playAudio
(
this
.
audioGoodjob
.
clip
,
()
=>
{
this
.
playAni
(
'
normal
'
,
0
);
callback
()
});
}
else
{
this
.
playAni
(
'
begin
'
,
0
);
resName
=
"
bg_ta
"
;
playAudio
(
this
.
audioTryagain
.
clip
,
()
=>
{
this
.
playAni
(
'
normal
'
,
0
);
callback
()
});
}
const
resNode
=
getSprNode
(
resName
);
item
.
addChild
(
resNode
);
resNode
.
x
=
-
140
;
resNode
.
y
=
156
;
const
starArr
=
item
.
starArr
;
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
resNode
.
scale
=
0
;
const
time
=
1
;
cc
.
tween
(
resNode
)
.
delay
(
1
*
0.25
)
.
to
(
time
,
{
scale
:
1
},
{
easing
:
'
elasticOut
'
})
.
start
()
const
star
=
starArr
[
i
];
if
(
i
>
count
-
1
)
{
star
.
active
=
false
;
continue
;
}
star
.
active
=
true
;
star
.
scale
=
0
;
const
time
=
1
;
cc
.
tween
(
star
)
.
delay
(
i
*
0.25
)
.
to
(
time
,
{
scale
:
1
},
{
easing
:
'
elasticOut
'
})
.
start
()
}
// if (count >= 2) {
// this.playAni('begin', 0);
// playAudio(this.audioGoodjob.clip, ()=>{
// this.playAni('normal', 0);
// callback()
// });
// } else {
// this.playAni('begin', 0);
// playAudio(this.audioTryagain.clip, ()=>{
// this.playAni('normal', 0);
// callback()
// });
// }
// const starArr = item.starArr;
// for (let i = 0; i < 3; i++) {
// const star = starArr[i];
// if (i > count - 1) {
// star.active = false;
// continue;
// }
// star.active = true;
// star.scale = 0;
// const time = 1;
// cc.tween(star)
// .delay(i * 0.25)
// .to(time, { scale: 1 }, { easing: 'elasticOut' })
// .start()
// }
},
initItemStarLayer
(
item
)
{
...
...
@@ -2628,6 +2676,9 @@ cc.Class({
let
percent
=
(
currentTime
-
item
.
startTime
)
/
item
.
duration
;
console
.
log
(
'
percent:
'
,
percent
);
console
.
log
(
'
this.lastTime:
'
,
this
.
lastTime
);
if
((
currentTime
-
this
.
lastTime
)
==
0
)
{
console
.
log
(
"
时间不变
"
);
this
.
fakePrecent
+=
0.001
;
...
...
@@ -2659,10 +2710,14 @@ cc.Class({
if
(
item
.
progressComp
)
{
item
.
progressComp
.
progress
=
percent
;
}
if
(
this
.
isRecord
&&
item
.
soundProgress
)
{
item
.
soundProgress
.
progress
=
percent
;
}
},
updateRecordEnd
()
{
console
.
log
(
"
in updateRecordEnd
"
)
if
(
!
this
.
curRecordItem
)
{
return
;
}
...
...
@@ -2676,6 +2731,8 @@ cc.Class({
this
.
hideBtn
=
null
;
}
console
.
log
(
"
isRecord ~
"
,
this
.
isRecord
);
if
(
this
.
isRecord
)
{
this
.
isRecord
=
false
;
this
.
refreshRecordBtnState
(
item
);
...
...
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