Commit 95d1cd7c authored by liujiangnan's avatar liujiangnan

feat: 适配背景

parent 827814f2
......@@ -452,7 +452,7 @@
{
"__type__": "cc.Node",
"_name": "background",
"_objFlags": 512,
"_objFlags": 0,
"_parent": {
"__id__": 7
},
......@@ -478,7 +478,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 4120
"height": 4500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -490,7 +490,7 @@
"ctor": "Float64Array",
"array": [
0,
3520,
3910,
0,
0,
0,
......@@ -530,7 +530,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "58106bb9-e80b-413e-84ee-ab6977e6d2f9"
"__uuid__": "2fc921fc-ed84-4e2e-9e29-0d844f5ee023"
},
"_type": 1,
"_sizeMode": 0,
......
......@@ -132,8 +132,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
moveUnitViewBackground() {
//获取滚动视图相对于左上角原点的当前滚动偏移
let scrollOffset: cc.Vec2 = this.UnitViewPager.getScrollOffset();
this.UnitsListNode.y = (scrollOffset.y * 8 / 9) + 600;
this.UnitPageViewBgNode.y = (scrollOffset.y * .81) + 600;
this.UnitsListNode.y = (scrollOffset.y * 8 / 9) + 600 * this._mapScaleMax;
this.UnitPageViewBgNode.y = (scrollOffset.y * .81) + 600 * this._mapScaleMax;
}
initBg() {
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