Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_camera
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
xy_camera
Commits
ef637b79
Commit
ef637b79
authored
Aug 17, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改适配问题
parent
b14030c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
40 deletions
+44
-40
xy_camera.fire
assets/xy_camera/scene/xy_camera.fire
+31
-31
xy_camera.ts
assets/xy_camera/scene/xy_camera.ts
+11
-7
tip_right.png.meta
assets/xy_camera/textures/tip_right.png.meta
+2
-2
No files found.
assets/xy_camera/scene/xy_camera.fire
View file @
ef637b79
...
...
@@ -794,8 +794,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2
430
,
"height":
1125
"width": 2
328
,
"height":
990
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -866,8 +866,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
400
,
"height":
800
"width": 1
361.0000000000005
,
"height":
764
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -878,8 +878,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-3
78.2930000000001
,
2.619
000000000028
,
-3
66.519
,
2.619,
0,
0,
0,
...
...
@@ -1164,8 +1164,8 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 1
36.70699999999988
,
"_right": 8
93.2930000000001
,
"_left": 1
16.98099999999977
,
"_right": 8
50.0189999999999
,
"_top": 92.38099999999997,
"_bottom": 97.61900000000003,
"_verticalCenter": 0,
...
...
@@ -1223,7 +1223,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
704
.155,
653
.155,
109.676,
0,
0,
...
...
@@ -1610,7 +1610,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
6
95
.158,
6
44
.158,
-217.973,
0,
0,
...
...
@@ -1713,7 +1713,7 @@
"__uuid__": "1a85a24c-074c-4de0-9bdf-49088fc69d30"
},
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -1737,8 +1737,8 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left":
3
,
"_right":
3
,
"_left":
54
,
"_right":
54
,
"_top": 249.438,
"_bottom": 225.562,
"_verticalCenter": 0,
...
...
@@ -5183,8 +5183,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2
18
,
"height": 1
06
"width": 2
34
,
"height": 1
21
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5195,15 +5195,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1
29.69
2,
-
100.502
,
-1
84.81
2,
-
75.64999999999998
,
0,
0,
0,
0,
1,
0.6
,
0.6
,
1
,
1
,
1
]
},
...
...
@@ -5239,7 +5239,7 @@
"__uuid__": "b259dd1c-71da-41ed-9db0-f2483fd32ca9"
},
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -5264,9 +5264,9 @@
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 6
4.2920000000000
2,
"_right": 6
7.81
2,
"_top": 0,
"_bottom": 7
4.198
00000000001,
"_bottom": 7
0.350
00000000001,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -5378,8 +5378,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2
18
,
"height": 1
06
"width": 2
34
,
"height": 1
21
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5390,15 +5390,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1
29.026
,
-
100.223
,
-1
84.765
,
-
76.595
,
0,
0,
0,
0,
1,
0.6
,
0.6
,
1
,
1
,
1
]
},
...
...
@@ -5434,7 +5434,7 @@
"__uuid__": "d08949e3-b952-4753-bb18-89f8f2082a4b"
},
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -5459,9 +5459,9 @@
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 6
3.62600000000002
,
"_right": 6
7.76499999999999
,
"_top": 0,
"_bottom":
74.477
,
"_bottom":
69.405
,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
assets/xy_camera/scene/xy_camera.ts
View file @
ef637b79
...
...
@@ -86,7 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
picture_url
=
null
;
async
initView
()
{
this
.
initBg
();
await
this
.
initBg
();
await
this
.
initTips
();
window
[
"
cameraHandler
"
].
takePictureCallback
=
(
err
,
url
)
=>
{
if
(
err
)
{
...
...
@@ -109,8 +109,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initBg
()
{
async
initBg
()
{
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
const
sfpr
:
any
=
await
asyncGetSpriteFrimeByUrl
(
this
.
data
.
image
);
bgNode
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
sfpr
;
bgNode
.
scale
=
this
.
_mapScaleMax
;
}
...
...
@@ -122,9 +124,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
startNode
.
active
=
true
;
const
data
:
any
=
await
setNetImg
(
cc
.
find
(
"
s_group/startbg
"
,
this
.
startNode
),
this
.
data
.
tipBg
,
{
w
:
0
,
h
:
0
},
false
);
this
.
page_view
.
width
=
data
.
w
-
240
;
this
.
page_view
.
height
=
data
.
h
-
200
;
this
.
page_view
.
x
=
-
(
data
.
w
/
2
);
this
.
page_view
.
width
=
data
.
w
-
340
;
this
.
page_view
.
height
=
data
.
h
-
150
;
this
.
page_view
.
x
=
-
(
data
.
w
/
2
)
-
85
;
this
.
data
.
tipPage
.
forEach
((
dt
,
idx
)
=>
{
let
desc
=
cc
.
instantiate
(
this
.
tip_label
);
desc
.
getComponent
(
cc
.
Label
).
string
=
dt
.
title
;
...
...
@@ -210,7 +214,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}).
start
();
this
.
page_view
.
getComponent
(
cc
.
PageView
).
setCurrentPageIndex
(
0
);
this
.
startNode
.
active
=
false
;
}
,
0.6
);
});
const
tipRight
=
cc
.
find
(
"
s_group/startbg/tip_right
"
,
this
.
startNode
);
buttonOnClick
(
tipRight
,
()
=>
{
...
...
@@ -218,7 +222,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
index
=
this
.
page_view
.
getComponent
(
cc
.
PageView
).
getCurrentPageIndex
();
this
.
page_view
.
getComponent
(
cc
.
PageView
).
scrollToPage
(
index
+
1
,
0.3
);
this
.
updataTipArrow
();
}
,
0.6
);
});
}
async
showFinal
()
{
...
...
assets/xy_camera/textures/tip_right.png.meta
View file @
ef637b79
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
15
4,
"height": 1
13
,
"width":
23
4,
"height": 1
21
,
"platformSettings": {},
"subMetas": {
"tip_right": {
...
...
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