Commit c2f26035 authored by Lwd's avatar Lwd

aaaa

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