Commit 95d1cd7c authored by liujiangnan's avatar liujiangnan

feat: 适配背景

parent 827814f2
...@@ -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": 4120 "height": 4500
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -490,7 +490,7 @@ ...@@ -490,7 +490,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
3520, 3910,
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,
......
...@@ -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 => {
......
{
"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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment