Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP32_PLUS
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
OP32_PLUS
Commits
081f1b63
Commit
081f1b63
authored
Oct 14, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复某些情况下小猫不说话的问题
parent
2309dc1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
OP32_PLUS.js
assets/OP32_PLUS/scene/OP32_PLUS.js
+10
-2
OP32_PLUS_resultLayer.js
assets/OP32_PLUS/scene/OP32_PLUS_resultLayer.js
+6
-2
No files found.
assets/OP32_PLUS/scene/OP32_PLUS.js
View file @
081f1b63
...
...
@@ -237,8 +237,12 @@ cc.Class({
refreshCoolCatPosition
()
{
},
jumpToQuestion
(
questionIdx
)
{
const
cat
=
cc
.
find
(
"
Canvas/bg/catFrame/CoolCat
"
);
const
questionAudioUrl
=
this
.
data
.
question_arr
[
questionIdx
].
audio_url
;
this
.
playAudioByUrl
(
questionAudioUrl
);
playDragonBoneAnimation
(
cat
,
"
begin
"
,
-
1
);
this
.
playAudioByUrl
(
questionAudioUrl
,
()
=>
{
playDragonBoneAnimation
(
cat
,
"
normal
"
,
-
1
);
});
const
box
=
cc
.
find
(
"
Canvas/bg/box
"
);
box
.
removeAllChildren
();
...
...
@@ -298,7 +302,11 @@ cc.Class({
optionNode
.
zIndex
=
selectedNum
;
this
.
optionJump
(
optionNode
);
this
.
playAudioByUrl
(
optionNode
.
optionData
.
audio_url
);
const
cat
=
cc
.
find
(
"
Canvas/bg/catFrame/CoolCat
"
);
playDragonBoneAnimation
(
cat
,
"
begin
"
,
-
1
);
this
.
playAudioByUrl
(
optionNode
.
optionData
.
audio_url
,
()
=>
{
playDragonBoneAnimation
(
cat
,
"
normal
"
,
-
1
);
});
});
console
.
log
(
'
optionNode.on(cc.Node.EventType.TOUCH_MOVE, (event) => {
'
)
optionNode
.
on
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
(
event
)
=>
{
...
...
assets/OP32_PLUS/scene/OP32_PLUS_resultLayer.js
View file @
081f1b63
import
{
RandomInt
}
from
"
../script/util
"
;
import
{
RandomInt
,
playDragonBoneAnimation
}
from
"
../script/util
"
;
cc
.
Class
({
extends
:
cc
.
Component
,
...
...
@@ -33,7 +33,11 @@ cc.Class({
if
(
isSelf
)
{
const
idx
=
this
.
_resultList
.
findIndex
(
result
=>
result
.
isSelf
==
true
);
if
(
idx
!=
-
1
)
{
this
.
playAudioByUrl
(
this
.
_finishAudioList
[
idx
]);
const
cat
=
cc
.
find
(
"
resultNode/catFrame/CoolCat
"
);
playDragonBoneAnimation
(
cat
,
"
begin
"
,
-
1
);
this
.
playAudioByUrl
(
this
.
_finishAudioList
[
idx
],
()
=>
{
playDragonBoneAnimation
(
cat
,
"
normal
"
,
-
1
);
});
}
}
},
...
...
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