Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP_03_1
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
OP_03_1
Commits
3f084fb1
Commit
3f084fb1
authored
Dec 30, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复结束后,再点击猫咪不播放音频问题
parent
8ad5ad63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
OP_03_1.js
play/assets/OP_03_1/scene/OP_03_1.js
+12
-2
No files found.
play/assets/OP_03_1/scene/OP_03_1.js
View file @
3f084fb1
...
...
@@ -337,6 +337,9 @@ cc.Class({
catBtn
.
addComponent
(
cc
.
Button
);
catBtn
.
on
(
'
click
'
,
()
=>
{
console
.
log
(
this
.
_canClickCat
,
this
.
_showStandby
);
if
(
!
this
.
_cantouch
){
return
;
}
...
...
@@ -353,6 +356,9 @@ cc.Class({
const
clickCat
=
(
audioUrl
,
aniName
)
=>
{
console
.
log
(
audioUrl
,
aniName
);
//播放待机音频
if
(
audioUrl
){
...
...
@@ -366,7 +372,7 @@ cc.Class({
});
}
else
{
this
.
playAni
(
aniName
,
1
,
()
=>
{
this
.
playAni
(
aniName
,
0
,
()
=>
{
this
.
_showStandby
=
false
;
});
}
...
...
@@ -379,7 +385,7 @@ cc.Class({
}
else
{
clickCat
(
this
.
data
.
guideAudioUrl2
,
'
normal
'
);
clickCat
(
this
.
data
.
guideAudioUrl2
,
'
begin
'
);
}
});
...
...
@@ -407,6 +413,7 @@ cc.Class({
.
call
(()
=>
{
if
(
times
>
2
){
this
.
_cantouch
=
true
;
this
.
_showStandby
=
false
;
return
;
}
...
...
@@ -793,11 +800,13 @@ cc.Class({
if
(
duration
-
currentTime
>
0.6
){
this
.
textTwinkle
(
node
);
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
this
.
_showStandby
=
false
;
showNext
();
});
}
else
{
this
.
textTwinkle
(
node
,
()
=>
{
this
.
_showStandby
=
false
;
showNext
();
});
}
...
...
@@ -870,6 +879,7 @@ cc.Class({
.
to
(
0.5
,
{
scale
:
node
.
initScale
})
.
call
(()
=>
{
this
.
_cantouch
=
true
;
if
(
this
.
_shown
){
return
;
}
...
...
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