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
63a78773
Commit
63a78773
authored
Oct 19, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 荷叶位置随屏幕适配
parent
b92949cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
82 deletions
+61
-82
FT_06.fire
play/assets/tmpGame/scene/FT_06.fire
+49
-80
FT_06.js
play/assets/tmpGame/scene/FT_06.js
+12
-2
No files found.
play/assets/tmpGame/scene/FT_06.fire
View file @
63a78773
...
...
@@ -17,10 +17,10 @@
"__id__": 2
},
{
"__id__": 8
5
"__id__": 8
4
},
{
"__id__": 9
6
"__id__": 9
5
}
],
"_active": true,
...
...
@@ -96,13 +96,13 @@
"_active": true,
"_components": [
{
"__id__": 8
2
"__id__": 8
1
},
{
"__id__": 8
3
"__id__": 8
2
},
{
"__id__": 8
4
"__id__": 8
3
}
],
"_prefab": null,
...
...
@@ -1066,7 +1066,7 @@
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags":
41
,
"_alignFlags":
17
,
"_left": 340.5,
"_right": 340.5,
"_top": -200,
...
...
@@ -2463,14 +2463,10 @@
"__id__": 79
}
],
"_active": false,
"_components": [
{
"__id__": 81
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity":
255
,
"_opacity":
0
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -3833,33 +3829,6 @@
"_atlas": null,
"_id": "5ctIMxaJpCPqDnXZ5q9xOm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 52
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "10zhMcFZhLa5A3dmjvWI0q"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
@@ -3923,19 +3892,19 @@
},
"_children": [
{
"__id__": 8
6
"__id__": 8
5
},
{
"__id__": 8
8
"__id__": 8
7
},
{
"__id__": 8
9
"__id__": 8
8
}
],
"_active": true,
"_components": [
{
"__id__": 9
5
"__id__": 9
4
}
],
"_prefab": null,
...
...
@@ -3991,13 +3960,13 @@
"_name": "OptionBg",
"_objFlags": 0,
"_parent": {
"__id__": 8
5
"__id__": 8
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
7
"__id__": 8
6
}
],
"_prefab": null,
...
...
@@ -4053,7 +4022,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
6
"__id__": 8
5
},
"_enabled": true,
"_materials": [
...
...
@@ -4085,7 +4054,7 @@
"_name": "OptionDragonBoneBaseNode",
"_objFlags": 0,
"_parent": {
"__id__": 8
5
"__id__": 8
4
},
"_children": [],
"_active": true,
...
...
@@ -4143,20 +4112,20 @@
"_name": "OptionSpeakerBtn",
"_objFlags": 0,
"_parent": {
"__id__": 8
5
"__id__": 8
4
},
"_children": [
{
"__id__":
90
"__id__":
89
},
{
"__id__": 9
2
"__id__": 9
1
}
],
"_active": true,
"_components": [
{
"__id__": 9
4
"__id__": 9
3
}
],
"_prefab": null,
...
...
@@ -4212,13 +4181,13 @@
"_name": "BtnFlower",
"_objFlags": 0,
"_parent": {
"__id__": 8
9
"__id__": 8
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
1
"__id__": 9
0
}
],
"_prefab": null,
...
...
@@ -4274,7 +4243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
90
"__id__":
89
},
"_enabled": true,
"_materials": [
...
...
@@ -4306,13 +4275,13 @@
"_name": "BtnFlower_P",
"_objFlags": 0,
"_parent": {
"__id__": 8
9
"__id__": 8
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
3
"__id__": 9
2
}
],
"_prefab": null,
...
...
@@ -4368,7 +4337,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
2
"__id__": 9
1
},
"_enabled": true,
"_materials": [
...
...
@@ -4400,7 +4369,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
9
"__id__": 8
8
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4468,7 +4437,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
5
"__id__": 8
4
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4540,19 +4509,19 @@
},
"_children": [
{
"__id__": 9
7
"__id__": 9
6
},
{
"__id__": 9
9
"__id__": 9
8
},
{
"__id__":
100
"__id__":
99
}
],
"_active": true,
"_components": [
{
"__id__": 10
6
"__id__": 10
5
}
],
"_prefab": null,
...
...
@@ -4608,13 +4577,13 @@
"_name": "OptionBg",
"_objFlags": 0,
"_parent": {
"__id__": 9
6
"__id__": 9
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
8
"__id__": 9
7
}
],
"_prefab": null,
...
...
@@ -4670,7 +4639,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
7
"__id__": 9
6
},
"_enabled": true,
"_materials": [
...
...
@@ -4702,7 +4671,7 @@
"_name": "OptionDragonBoneBaseNode",
"_objFlags": 0,
"_parent": {
"__id__": 9
6
"__id__": 9
5
},
"_children": [],
"_active": true,
...
...
@@ -4760,20 +4729,20 @@
"_name": "OptionSpeakerBtn",
"_objFlags": 0,
"_parent": {
"__id__": 9
6
"__id__": 9
5
},
"_children": [
{
"__id__": 10
1
"__id__": 10
0
},
{
"__id__": 10
3
"__id__": 10
2
}
],
"_active": true,
"_components": [
{
"__id__": 10
5
"__id__": 10
4
}
],
"_prefab": null,
...
...
@@ -4829,13 +4798,13 @@
"_name": "BtnFlower",
"_objFlags": 0,
"_parent": {
"__id__":
100
"__id__":
99
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
2
"__id__": 10
1
}
],
"_prefab": null,
...
...
@@ -4891,7 +4860,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
1
"__id__": 10
0
},
"_enabled": true,
"_materials": [
...
...
@@ -4923,13 +4892,13 @@
"_name": "BtnFlower_P",
"_objFlags": 0,
"_parent": {
"__id__":
100
"__id__":
99
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
4
"__id__": 10
3
}
],
"_prefab": null,
...
...
@@ -4985,7 +4954,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
3
"__id__": 10
2
},
"_enabled": true,
"_materials": [
...
...
@@ -5017,7 +4986,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
100
"__id__":
99
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -5085,7 +5054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
6
"__id__": 9
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
play/assets/tmpGame/scene/FT_06.js
View file @
63a78773
...
...
@@ -106,6 +106,12 @@ cc.Class({
initNodes
()
{
const
tittleLabelNode
=
cc
.
find
(
'
Canvas/bgFrount/leef/TittleLabelNode
'
);
tittleLabelNode
.
getComponent
(
cc
.
Label
).
string
=
this
.
data
.
tittleTxt
;
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
optionPosListBase
=
cc
.
find
(
'
Canvas/OptionPosListBase
'
);
optionPosListBase
.
scaleX
=
canvas
.
width
/
optionPosListBase
.
width
;
optionPosListBase
.
scaleY
=
canvas
.
height
/
optionPosListBase
.
height
;
},
initListeners
()
{
...
...
@@ -176,8 +182,12 @@ cc.Class({
this
.
onOptionClicked
(
optionNode
,
idx
);
});
const
optionPosListBase
=
cc
.
find
(
'
Canvas/OptionPosListBase
'
);
optionNode
.
scaleX
=
Math
.
min
(
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
,
1
);
optionNode
.
scaleY
=
Math
.
min
(
optionPosListBase
.
scaleX
,
optionPosListBase
.
scaleY
,
1
);
const
posNode
=
cc
.
find
(
`Canvas/OptionPosListBase/Option_
${
optionList
.
length
}
_
${
idx
}
`
)
optionNode
.
x
=
posNode
.
x
;
optionNode
.
x
=
posNode
.
x
*
optionPosListBase
.
scaleX
;
optionNode
.
y
=
posNode
.
y
;
const
animeNode
=
await
asyncLoadDragonBoneAnime
(
cc
.
find
(
'
OptionDragonBoneBaseNode
'
,
optionNode
),
data
.
optionDragonBone
);
...
...
@@ -193,7 +203,7 @@ cc.Class({
addButtonListener
(
cc
.
find
(
'
OptionSpeakerBtn
'
,
optionNode
),
async
()
=>
{
blinkNode
(
optionNode
,
btnFlowerP
,
btnFlower
);
await
asyncPlayEffectByUrl
(
data
.
optionAudio
);
// asyncPlayDragonBoneAnimation(animeNode, 'smoke', 1);
asyncPlayDragonBoneAnimation
(
animeNode
,
'
normal
'
,
1
);
stopBlinkNode
(
optionNode
,
btnFlowerP
,
btnFlower
);
...
...
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