Commit fff99226 authored by Lwd's avatar Lwd

aaaa

parent b6cc7433
......@@ -183,7 +183,7 @@
"array": [
0,
0,
525.6690044109976,
277.1281292110204,
0,
0,
0,
......@@ -4952,7 +4952,7 @@
},
{
"__type__": "cc.Node",
"_name": "New Sprite",
"_name": "Sprite",
"_objFlags": 0,
"_parent": {
"__id__": 107
......@@ -5029,7 +5029,7 @@
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -5246,7 +5246,7 @@
"__id__": 115
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 117
......@@ -5328,8 +5328,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 852,
"height": 516
"width": 942,
"height": 628
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -5381,7 +5381,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8c658fc0-c1e4-4993-bce4-b5cce324b69b"
"__uuid__": "2ab3ca28-bd3f-4890-a771-e1d6fc8c9337"
},
"_type": 0,
"_sizeMode": 1,
......@@ -5512,7 +5512,7 @@
},
"component": "",
"_componentId": "b01b30rB85Exb1aIQxobbR8",
"handler": "playSpine",
"handler": "onBtnText",
"customEventData": ""
},
{
......@@ -5970,8 +5970,8 @@
0,
0,
0,
-0.08715574274765817,
0.9961946980917455,
0,
1,
1,
1,
1
......@@ -5981,7 +5981,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -10
"z": 0
},
"_skewX": 0,
"_skewY": 0,
......@@ -6006,7 +6006,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "6f1abc14-e99b-4519-88b0-43b29f826fd0"
"__uuid__": "1a2301a0-8f1f-47d3-b755-ec4861bf5396"
},
"_type": 0,
"_sizeMode": 0,
......
......@@ -92,16 +92,6 @@ cc.Class({
}
},
// //屏幕缩放事件
// scaleEventCallBack: function () {
// //setTimeout(function () {
// g.log("屏幕缩放");
// g.event_mgr.send("adjustUI");
// //}, 500); //延迟0.5秒
// },
onDestroy: function () {
},
......
......@@ -81,13 +81,14 @@ var result = cc.Class({
this.frame_tips.active = false;
//播放撒花音效
g.speaker.inst.play_congratulation();
setTimeout(() => {
this.node.active = false;
}, 3000)
}
},
// 初始化文本
initRichText(text) {
//this.lb_tips.string = text;
// text = 'I am flying';
this.layoutText.removeAllChildren();
if (!text) {
return;
......@@ -124,10 +125,24 @@ var result = 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(740 / node.height, 400 / 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;
},
//播放龙骨动画
playSpine() {
this.Armature.playAnimation(g.data_mgr.dragonName, 1);
......@@ -138,7 +153,7 @@ var result = cc.Class({
this.Armature.dragonAsset = null;
this.Armature.armatureName = '';
this.scheduleOnce(() => {
g.res_mgr.loadSpine(this.Armature, this.Info);
g.res_mgr.loadSpine(this.Armature, this.itemInfo);
})
},
......@@ -166,7 +181,7 @@ var result = cc.Class({
this.unschedule(this.chengeTextColor);
}
this.layoutText.children[this.textIndex] && (this.layoutText.children[this.textIndex].color = new cc.Color().fromHEX(Color_texts[3]));
this.layoutText.children[this.textIndex - 1] && (this.layoutText.children[this.textIndex - 1].color = new cc.Color().fromHEX(Color_texts[3]));
this.layoutText.children[this.textIndex - 1] && (this.layoutText.children[this.textIndex - 1].color = new cc.Color().fromHEX(Color_texts[1]));
this.textIndex++;
},
clearTextColor() {
......@@ -176,9 +191,11 @@ var result = cc.Class({
},
onBtnText() {
this.stopSpine();
this.clearTextColor();
this.stopAudio();
this.playAudio();
this.playSpine();
},
//点击关闭
......@@ -189,8 +206,10 @@ var result = cc.Class({
return;
}
if (g.data_mgr.temPlayAudio.length < 1) {
//显示结算撒花
g.game.inst.showResult();
if (g.data_mgr.pageId == g.data_mgr.data.contentObj.pageArr.length - 1) {
//显示结算撒花
g.game.inst.showResult();
}
this.End = false;
} else {
//重新随机一组数据
......
{
"ver": "2.3.5",
"uuid": "79f70525-a9d8-4886-842b-1f2954680deb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 60,
"height": 64,
"platformSettings": {},
"subMetas": {
"btn_close": {
"ver": "1.0.4",
"uuid": "1a2301a0-8f1f-47d3-b755-ec4861bf5396",
"rawTextureUuid": "79f70525-a9d8-4886-842b-1f2954680deb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 60,
"height": 64,
"rawWidth": 60,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a43a95e3-ea54-4b9e-a6c0-f44ba60d8ed8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 942,
"height": 628,
"platformSettings": {},
"subMetas": {
"frame_4": {
"ver": "1.0.4",
"uuid": "2ab3ca28-bd3f-4890-a771-e1d6fc8c9337",
"rawTextureUuid": "a43a95e3-ea54-4b9e-a6c0-f44ba60d8ed8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 942,
"height": 628,
"rawWidth": 942,
"rawHeight": 628,
"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