Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FT_06
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
FT_06
Commits
0f046670
Commit
0f046670
authored
Nov 10, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 分辨率适配问题
parent
9ce7f7ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
FT_06.fire
play/assets/tmpGame/scene/FT_06.fire
+1
-1
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+21
-3
No files found.
play/assets/tmpGame/scene/FT_06.fire
View file @
0f046670
...
@@ -1675,7 +1675,7 @@
...
@@ -1675,7 +1675,7 @@
"array": [
"array": [
0,
0,
0,
0,
702.373665763048
,
805.7013217520789
,
0,
0,
0,
0,
0,
0,
...
...
play/assets/tmpGame/scene/FT_06.js
View file @
0f046670
...
@@ -134,6 +134,18 @@ cc.Class({
...
@@ -134,6 +134,18 @@ cc.Class({
},
},
initListeners
()
{
initListeners
()
{
this
.
node
.
on
(
'
scale-changed
'
,
()
=>
{
console
.
log
(
'
scale-changed
'
);
this
.
showQuestion
();
this
.
updateButtons
();
});
this
.
node
.
on
(
'
size-changed
'
,
()
=>
{
console
.
log
(
'
size-changed
'
);
this
.
showQuestion
();
this
.
updateButtons
();
});
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
),
()
=>
{
addButtonListener
(
cc
.
find
(
'
Canvas/BtnNode/BtnBefore
'
),
()
=>
{
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
if
(
this
.
status
.
currentQuestionIdx
<=
0
)
{
return
false
;
return
false
;
...
@@ -173,6 +185,7 @@ cc.Class({
...
@@ -173,6 +185,7 @@ cc.Class({
},
},
async
showQuestion
(
isFirstIncome
=
false
)
{
async
showQuestion
(
isFirstIncome
=
false
)
{
this
.
resetQuestionBoard
();
this
.
showOptions
();
this
.
showOptions
();
this
.
questionBoardDown
();
this
.
questionBoardDown
();
if
(
isFirstIncome
)
{
if
(
isFirstIncome
)
{
...
@@ -210,11 +223,11 @@ cc.Class({
...
@@ -210,11 +223,11 @@ cc.Class({
});
});
const
optionPosListBase
=
cc
.
find
(
'
Canvas/OptionPosListBase
'
);
const
optionPosListBase
=
cc
.
find
(
'
Canvas/OptionPosListBase
'
);
optionNode
.
scaleX
=
Math
.
min
(
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
,
1
)
;
optionNode
.
scaleX
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
optionPosListBase
.
scaleX
;
optionNode
.
scaleY
=
Math
.
min
(
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
,
1
)
;
optionNode
.
scaleY
=
Math
.
min
(
1
,
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
)
/
optionPosListBase
.
scaleY
;
const
posNode
=
cc
.
find
(
`Canvas/OptionPosListBase/Option_
${
optionList
.
length
}
_
${
idx
}
`
)
const
posNode
=
cc
.
find
(
`Canvas/OptionPosListBase/Option_
${
optionList
.
length
}
_
${
idx
}
`
)
optionNode
.
x
=
posNode
.
x
*
optionPosListBase
.
scaleX
;
optionNode
.
x
=
posNode
.
x
;
optionNode
.
y
=
posNode
.
y
;
optionNode
.
y
=
posNode
.
y
;
const
btnFlower
=
cc
.
find
(
'
OptionSpeakerBtn/BtnFlower
'
,
optionNode
);
const
btnFlower
=
cc
.
find
(
'
OptionSpeakerBtn/BtnFlower
'
,
optionNode
);
...
@@ -304,6 +317,11 @@ cc.Class({
...
@@ -304,6 +317,11 @@ cc.Class({
});
});
},
},
resetQuestionBoard
()
{
const
labelBgNode
=
cc
.
find
(
'
Canvas/QuestionLabelBg
'
);
labelBgNode
.
y
=
463
;
},
async
questionBoardDown
()
{
async
questionBoardDown
()
{
const
questionStr
=
this
.
data
.
questionList
[
this
.
status
.
currentQuestionIdx
].
questionTxt
;
const
questionStr
=
this
.
data
.
questionList
[
this
.
status
.
currentQuestionIdx
].
questionTxt
;
const
questionLabel
=
cc
.
find
(
'
Canvas/QuestionLabelBg/QuestionLabelNode
'
);
const
questionLabel
=
cc
.
find
(
'
Canvas/QuestionLabelBg/QuestionLabelNode
'
);
...
...
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