Commit 7ac6e613 authored by xytk's avatar xytk

提交代码

parent 456c0b85
......@@ -85,21 +85,24 @@
},
{
"__id__": 42
},
{
"__id__": 44
}
],
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 54
},
{
"__id__": 53
"__id__": 55
},
{
"__id__": 55
"__id__": 57
},
{
"__id__": 54
"__id__": 56
}
],
"_prefab": null,
......@@ -189,7 +192,7 @@
"array": [
0,
0,
578.3992193418256,
586.5427680068793,
0,
0,
0,
......@@ -442,7 +445,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 500,
"width": 445,
"height": 104
},
"_anchorPoint": {
......@@ -555,7 +558,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 350,
"width": 290,
"height": 56.4
},
"_anchorPoint": {
......@@ -610,8 +613,8 @@
"_useOriginalSize": false,
"_string": "Listen and Droag",
"_N$string": "Listen and Droag",
"_fontSize": 40,
"_lineHeight": 40,
"_fontSize": 36,
"_lineHeight": 36,
"_enableWrapText": false,
"_N$file": {
"__uuid__": "9de7e940-49b7-4208-a6fd-efbfd529cfa6"
......@@ -1263,7 +1266,7 @@
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -1496,8 +1499,8 @@
"_useOriginalSize": false,
"_string": "Blend A with B to make ab,bab,bab,bab.",
"_N$string": "Blend A with B to make ab,bab,bab,bab.",
"_fontSize": 40,
"_lineHeight": 40,
"_fontSize": 48,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "ba5cb94f-a8af-4b01-b548-414f4a31cea2"
......@@ -1707,6 +1710,108 @@
"_originalHeight": 0,
"_id": "70Zu8iVClD+aCTkCjHtxtg"
},
{
"__type__": "cc.Node",
"_name": "New TiledMap",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 402.08407761575506,
"height": 313.1361171716606
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "016m3ctOJLt6/0irtijIfi"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "unit1_boy_jump",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "716bf20c-5e8e-4b11-80d7-3cdeb16f947b#579b28fe-0e39-4fd3-84e8-e5910ee77031",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "716bf20c-5e8e-4b11-80d7-3cdeb16f947b"
},
"_N$dragonAtlasAsset": {
"__uuid__": "579b28fe-0e39-4fd3-84e8-e5910ee77031"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "b4agz5Xg5Aw6+3nX/Un1Fo"
},
{
"__type__": "cc.Node",
"_name": "res",
......@@ -1716,13 +1821,13 @@
},
"_children": [
{
"__id__": 43
"__id__": 45
},
{
"__id__": 46
"__id__": 48
},
{
"__id__": 49
"__id__": 51
}
],
"_active": false,
......@@ -1780,11 +1885,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [
{
"__id__": 44
"__id__": 46
}
],
"_active": true,
......@@ -1842,13 +1947,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 43
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 47
}
],
"_prefab": null,
......@@ -1904,7 +2009,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 46
},
"_enabled": true,
"_materials": [
......@@ -1940,11 +2045,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [
{
"__id__": 47
"__id__": 49
}
],
"_active": true,
......@@ -2002,13 +2107,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 46
"__id__": 48
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
......@@ -2064,7 +2169,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 49
},
"_enabled": true,
"_materials": [
......@@ -2096,11 +2201,11 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [
{
"__id__": 50
"__id__": 52
}
],
"_active": true,
......@@ -2158,13 +2263,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 51
"__id__": 53
}
],
"_prefab": null,
......@@ -2220,7 +2325,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 52
},
"_enabled": true,
"_clip": {
......@@ -2259,7 +2364,7 @@
},
"_enabled": true,
"loadInAudioSource": {
"__id__": 54
"__id__": 56
},
"dragonBonesNode": {
"__id__": 19
......
const {ccclass, property} = cc._decorator;
enum NodeType {
"BG",""
}
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "8e66bd5f-a4b8-47ed-9f53-2e61d70c3a78",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -206,9 +206,13 @@ cc.Class({
}
let width = animNode.width;
let height = animNode.height;
animNode.width = width;
animNode.height = height;
let tWidth = texture.width;
let tHeight = texture.height;
if(tWidth/tHeight>width/height){
animNode.scale = width/tWidth;
}else{
animNode.scale = height/tHeight;
}
});
});
});
......@@ -244,15 +248,22 @@ cc.Class({
let width = this.pic_a_sprite.node.width;
let height = this.pic_a_sprite.node.height;
this.pic_a_sprite.spriteFrame = spriteFrame;
this.pic_a_sprite.node.width = width;
this.pic_a_sprite.node.height = height;
// cc.log(this.pic_a_sprite.node.scale);
if(this.pic_a_sprite.node.width/this.pic_a_sprite.node.height > width/height){
this.pic_a_sprite.node.scale = width/this.pic_a_sprite.node.width;
}else{
this.pic_a_sprite.node.scale = height/this.pic_a_sprite.node.height;
}
});
this.getSpriteFrimeByUrl(this.data.pic_C_url,(spriteFrame)=>{
let width = this.pic_c_sprite.node.width;
let height = this.pic_c_sprite.node.height;
this.pic_c_sprite.spriteFrame = spriteFrame;
this.pic_c_sprite.node.width = width;
this.pic_c_sprite.node.height = height;
if(this.pic_c_sprite.node.width/this.pic_c_sprite.node.height > width/height){
this.pic_c_sprite.node.scale = width/this.pic_c_sprite.node.width;
}else{
this.pic_c_sprite.node.scale = height/this.pic_c_sprite.node.height;
}
});
},
......
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