Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP32
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
Commits
dbd87590
Commit
dbd87590
authored
Mar 22, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
效果调整
parent
56afab1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
OP32.js
assets/OP32/scene/OP32.js
+26
-6
No files found.
assets/OP32/scene/OP32.js
View file @
dbd87590
...
@@ -266,13 +266,11 @@ cc.Class({
...
@@ -266,13 +266,11 @@ cc.Class({
}
}
//copy-start 把物品的父节点换到中间的box上。
//copy-start 把物品的父节点换到中间的box上。
const
box_mid
=
cc
.
find
(
'
Canvas/bg/box_mid
'
);
const
box_mid
=
cc
.
find
(
'
Canvas/bg/box_mid
'
);
optionNode
.
parent
=
box_mid
;
cc
.
tween
(
optionNode
).
to
(
0.2
,
{
x
:
0
,
y
:
420
},
cc
.
easing
.
quadOut
).
call
(()
=>
{
optionNode
.
parent
=
box_mid
;
}).
to
(
0.2
,
{
x
:
0
,
y
:
100
},
cc
.
easing
.
quadOut
).
start
();
//copy-end
//copy-end
cc
.
tween
(
optionNode
)
.
to
(
0.2
,
{
x
:
0
,
y
:
100
},
cc
.
easing
.
quadOut
)
.
start
();
this
.
boxJump
();
this
.
boxJump
();
optionNode
.
optionData
.
selected
=
true
;
optionNode
.
optionData
.
selected
=
true
;
...
@@ -303,7 +301,13 @@ cc.Class({
...
@@ -303,7 +301,13 @@ cc.Class({
this
.
optionJump
(
btnSubmit
,
0.05
);
this
.
optionJump
(
btnSubmit
,
0.05
);
this
.
playEffect
(
'
submit
'
);
this
.
playEffect
(
'
submit
'
);
const
box
=
cc
.
find
(
'
Canvas/bg/box
'
);
const
box
=
cc
.
find
(
'
Canvas/bg/box
'
);
if
(
box
.
children
.
every
(
child
=>
child
.
optionData
.
selected
==
child
.
optionData
.
is_right
))
{
//copy-start 把物品的父节点换到中间的box上。
const
box_mid
=
cc
.
find
(
'
Canvas/bg/box_mid
'
);
let
children
=
box
.
children
.
concat
(
box_mid
.
children
);
if
(
children
.
every
(
child
=>
child
.
optionData
.
selected
==
child
.
optionData
.
is_right
))
{
//copy-end
this
.
onAnswerRight
();
this
.
onAnswerRight
();
}
else
{
}
else
{
this
.
coolCatSpeakWrong
(()
=>
{
this
.
coolCatSpeakWrong
(()
=>
{
...
@@ -376,6 +380,22 @@ cc.Class({
...
@@ -376,6 +380,22 @@ cc.Class({
.
start
();
.
start
();
});
});
//copy-start 把物品的父节点换到中间的box上。
const
box_mid
=
cc
.
find
(
'
Canvas/bg/box_mid
'
);
box_mid
.
children
.
filter
(
child
=>
child
.
optionData
.
selected
)
.
forEach
(
child
=>
{
child
.
optionData
.
selected
=
false
;
cc
.
tween
(
child
)
.
to
(
0.2
,
{
x
:
child
.
startPos
.
x
,
y
:
child
.
startPos
.
y
})
.
call
(()
=>
{
child
.
parent
=
box
;
})
.
start
();
});
//copy-end
this
.
playEffect
(
'
flyBackAll
'
);
this
.
playEffect
(
'
flyBackAll
'
);
},
},
...
...
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