Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MonkyTree
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
NJ_MonkyTree
Commits
95d1cd7c
Commit
95d1cd7c
authored
Jun 14, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 适配背景
parent
827814f2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
6 deletions
+42
-6
NJ_MonkyTree.fire
assets/NJ_MonkyTree/scene/NJ_MonkyTree.fire
+4
-4
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+2
-2
bg.png
assets/NJ_MonkyTree/textures/units/bg.png
+0
-0
bg.png.meta
assets/NJ_MonkyTree/textures/units/bg.png.meta
+36
-0
No files found.
assets/NJ_MonkyTree/scene/NJ_MonkyTree.fire
View file @
95d1cd7c
...
@@ -452,7 +452,7 @@
...
@@ -452,7 +452,7 @@
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "background",
"_name": "background",
"_objFlags":
512
,
"_objFlags":
0
,
"_parent": {
"_parent": {
"__id__": 7
"__id__": 7
},
},
...
@@ -478,7 +478,7 @@
...
@@ -478,7 +478,7 @@
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 2000,
"width": 2000,
"height": 4
12
0
"height": 4
50
0
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -490,7 +490,7 @@
...
@@ -490,7 +490,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
3
52
0,
3
91
0,
0,
0,
0,
0,
0,
0,
...
@@ -530,7 +530,7 @@
...
@@ -530,7 +530,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
58106bb9-e80b-413e-84ee-ab6977e6d2f9
"
"__uuid__": "
2fc921fc-ed84-4e2e-9e29-0d844f5ee023
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
...
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
95d1cd7c
...
@@ -132,8 +132,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -132,8 +132,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
moveUnitViewBackground
()
{
moveUnitViewBackground
()
{
//获取滚动视图相对于左上角原点的当前滚动偏移
//获取滚动视图相对于左上角原点的当前滚动偏移
let
scrollOffset
:
cc
.
Vec2
=
this
.
UnitViewPager
.
getScrollOffset
();
let
scrollOffset
:
cc
.
Vec2
=
this
.
UnitViewPager
.
getScrollOffset
();
this
.
UnitsListNode
.
y
=
(
scrollOffset
.
y
*
8
/
9
)
+
600
;
this
.
UnitsListNode
.
y
=
(
scrollOffset
.
y
*
8
/
9
)
+
600
*
this
.
_mapScaleMax
;
this
.
UnitPageViewBgNode
.
y
=
(
scrollOffset
.
y
*
.
81
)
+
600
;
this
.
UnitPageViewBgNode
.
y
=
(
scrollOffset
.
y
*
.
81
)
+
600
*
this
.
_mapScaleMax
;
}
}
initBg
()
{
initBg
()
{
this
.
rootAttrTree
.
querySelectorAll
(
'
.page-holder
'
).
forEach
(
p
=>
{
this
.
rootAttrTree
.
querySelectorAll
(
'
.page-holder
'
).
forEach
(
p
=>
{
...
...
assets/NJ_MonkyTree/textures/units/bg.png
0 → 100644
View file @
95d1cd7c
54.3 KB
assets/NJ_MonkyTree/textures/units/bg.png.meta
0 → 100644
View file @
95d1cd7c
{
"ver": "2.3.5",
"uuid": "3a4edb8a-8a45-413b-a2e2-081cc8df1fa7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 500,
"height": 1125,
"platformSettings": {},
"subMetas": {
"bg": {
"ver": "1.0.4",
"uuid": "2fc921fc-ed84-4e2e-9e29-0d844f5ee023",
"rawTextureUuid": "3a4edb8a-8a45-413b-a2e2-081cc8df1fa7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 500,
"height": 1125,
"rawWidth": 500,
"rawHeight": 1125,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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