Commit c2f26035 authored by Lwd's avatar Lwd

aaaa

parent 5639f131
......@@ -180,7 +180,7 @@
"array": [
0,
0,
295.4770424537032,
539.5338265577053,
0,
0,
0,
......@@ -4211,7 +4211,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -4308,7 +4308,7 @@
"__uuid__": "195d9780-fbd4-413e-9929-08c906efd775"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -4538,8 +4538,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
"width": 42,
"height": 41
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4594,7 +4594,7 @@
"__uuid__": "72726b06-efbb-49a1-906e-3d0b4f8f812a"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -5061,7 +5061,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -5196,8 +5196,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 138,
"height": 138
"width": 148,
"height": 148
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5252,7 +5252,7 @@
"__uuid__": "9b752013-ab8c-4a58-bae9-6c0e6dcbd68d"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -5482,8 +5482,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
"width": 42,
"height": 41
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5538,7 +5538,7 @@
"__uuid__": "72726b06-efbb-49a1-906e-3d0b4f8f812a"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......
......@@ -51,10 +51,24 @@ cc.Class({
//图片资源
g.res_mgr.getSpriteFrimeByUrl(url, function (list) {
this.Picture.getComponent(cc.Sprite).spriteFrame = list;
this.photoScare(this.Picture);
this.Picture.active = true;
}.bind(this));
},
//图片适配
photoScare: function (node) {
let maxSize = Math.min(90 / node.height, 90 / node.width);
if (node.perScale == undefined) {
node.perScale = node.scaleX;
} else {
node.scaleX = node.perScale;
node.scaleY = node.perScale;
}
node.scaleX *= maxSize;
node.scaleY *= maxSize;
},
//设置按钮状态
setBtnOpen: function (b) {
this.node.getComponent(cc.Button).enabled = b;
......
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