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
b941090d
Commit
b941090d
authored
Mar 31, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
489b8b25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
OP32_PLUS.js
assets/OP32_PLUS/scene/OP32_PLUS.js
+11
-16
No files found.
assets/OP32_PLUS/scene/OP32_PLUS.js
View file @
b941090d
...
...
@@ -210,9 +210,6 @@ cc.Class({
this
.
loadingLayer
.
onLoadFinished
(()
=>
{
this
.
refreshCoolCatPosition
();
//TODO:copy
this
.
hideFlower
();
this
.
coolCatSpeakStart
(()
=>
{
this
.
startCountTime
();
this
.
jumpToQuestion
(
this
.
status
.
currentQuestionIdx
);
...
...
@@ -245,8 +242,9 @@ cc.Class({
const
canvasHeight
=
cc
.
find
(
"
Canvas
"
).
height
;
const
optionNum
=
this
.
data
.
question_arr
[
questionIdx
].
option_arr
.
length
;
//TODO:copy---start
this
.
hideFlower
();
const
maxOptionHeight
=
400
;
const
maxOptionWidth
=
(
canvasWidth
*
0.8
)
/
optionNum
>
300
?
300
:
(
canvasWidth
*
0.8
)
/
optionNum
;
const
maxOptionWidth
=
(
canvasWidth
*
0.8
)
/
optionNum
;
const
box_mid
=
cc
.
find
(
'
Canvas/bg/box_mid
'
);
box_mid
.
removeAllChildren
();
//TODO:copy---end
...
...
@@ -259,14 +257,10 @@ cc.Class({
optionNode
.
y
=
canvasHeight
/
2
-
box
.
y
-
300
;
optionNode
.
scale
=
0
;
optionNode
.
parent
=
box
;
optionNode
.
targetScale
=
Math
.
min
((
maxOptionWidth
*
0.80
)
/
optionNode
.
width
,
maxOptionHeight
/
optionNode
.
height
)
cc
.
tween
(
optionNode
)
.
to
(
0.1
,
{
scale
:
Math
.
min
(
(
maxOptionWidth
*
0.8
)
/
optionNode
.
width
,
maxOptionHeight
/
optionNode
.
height
),
})
.
to
(
0.1
,
{
scale
:
optionNode
.
targetScale
})
.
start
();
});
},
...
...
@@ -335,7 +329,7 @@ cc.Class({
const
box_mid
=
cc
.
find
(
'
Canvas/bg/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
();
}).
to
(
0.2
,
{
x
:
0
,
y
:
100
,
scale
:
0.6
},
cc
.
easing
.
quadOut
).
start
();
//copy-end
...
...
@@ -495,6 +489,8 @@ cc.Class({
//TODO:copy---start
showFlower
()
{
const
flower
=
cc
.
find
(
'
Canvas/bg/烟花_ske
'
);
const
db
=
flower
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
db
.
playAnimation
(
"
normal
"
,
1
)
flower
.
active
=
true
;
},
hideFlower
()
{
...
...
@@ -505,6 +501,8 @@ cc.Class({
onAnswerRight
()
{
//TODO:copy---放烟花时机修改
this
.
showFlower
();
this
.
coolCatSpeakRight
(()
=>
{
//TODO:copy
...
...
@@ -521,7 +519,7 @@ cc.Class({
.
forEach
((
child
)
=>
{
child
.
optionData
.
selected
=
false
;
cc
.
tween
(
child
)
.
to
(
0.2
,
{
x
:
child
.
startPos
.
x
,
y
:
child
.
startPos
.
y
})
.
to
(
0.2
,
{
x
:
child
.
startPos
.
x
,
y
:
child
.
startPos
.
y
,
scale
:
child
.
targetScale
})
.
start
();
});
...
...
@@ -532,7 +530,7 @@ cc.Class({
.
forEach
(
child
=>
{
child
.
optionData
.
selected
=
false
;
cc
.
tween
(
child
)
.
to
(
0.2
,
{
x
:
child
.
startPos
.
x
,
y
:
child
.
startPos
.
y
})
.
to
(
0.2
,
{
x
:
child
.
startPos
.
x
,
y
:
child
.
startPos
.
y
,
scale
:
child
.
targetScale
})
.
call
(()
=>
{
child
.
parent
=
box
;
})
...
...
@@ -563,9 +561,6 @@ cc.Class({
},
0.1
*
1000
)
);
}
else
{
//TODO:copy
this
.
showFlower
();
this
.
coolCatSpeakEnd
(()
=>
{
this
.
submitBtnMoveOut
();
this
.
showNextBtn
();
...
...
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