Commit 936126a2 authored by Tt's avatar Tt

制作完成

parent e57929b2
......@@ -75,19 +75,19 @@
"__id__": 5
},
{
"__id__": 49
"__id__": 51
}
],
"_active": true,
"_components": [
{
"__id__": 69
"__id__": 71
},
{
"__id__": 70
"__id__": 72
},
{
"__id__": 71
"__id__": 73
}
],
"_prefab": null,
......@@ -254,19 +254,19 @@
"__id__": 11
},
{
"__id__": 29
"__id__": 31
},
{
"__id__": 30
"__id__": 32
},
{
"__id__": 39
"__id__": 41
}
],
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
......@@ -548,6 +548,9 @@
},
{
"__id__": 23
},
{
"__id__": 29
}
],
"_active": true,
......@@ -699,7 +702,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 517,
"width": 516,
"height": 462
},
"_anchorPoint": {
......@@ -734,7 +737,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e1dU0FWtBOjaGKXE85P4sE"
"_id": "a6Eo3fJzdFnrwy6x0kkGlw"
},
{
"__type__": "cc.Sprite",
......@@ -752,7 +755,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "522aca64-35a5-4cc3-8898-c0fb00aae3d0"
"__uuid__": "7a043091-0c89-4c3c-9211-36465de33194"
},
"_type": 0,
"_sizeMode": 1,
......@@ -766,7 +769,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d1od7PbPxFGaKxdr4S35Da"
"_id": "74eV1f3Y9FqJyiktN+dVkU"
},
{
"__type__": "cc.Node",
......@@ -793,7 +796,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 516,
"width": 517,
"height": 462
},
"_anchorPoint": {
......@@ -828,7 +831,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a6Eo3fJzdFnrwy6x0kkGlw"
"_id": "e1dU0FWtBOjaGKXE85P4sE"
},
{
"__type__": "cc.Sprite",
......@@ -846,7 +849,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7a043091-0c89-4c3c-9211-36465de33194"
"__uuid__": "522aca64-35a5-4cc3-8898-c0fb00aae3d0"
},
"_type": 0,
"_sizeMode": 1,
......@@ -860,7 +863,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "74eV1f3Y9FqJyiktN+dVkU"
"_id": "d1od7PbPxFGaKxdr4S35Da"
},
{
"__type__": "cc.Node",
......@@ -1414,6 +1417,108 @@
"_enabled": true,
"_id": "e0HjagholEIoAalLMGTFnu"
},
{
"__type__": "cc.Node",
"_name": "bubble_right",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 30
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 392,
"height": 391
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1.3,
1.3,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "014XM73MtBbrixHOKnYirW"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "newAnimation",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "f82459d0-9f1a-4eec-b93a-fa736f92a4ce#b59d0cc4-8ad1-4629-81f5-e15ae97f5cad",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "f82459d0-9f1a-4eec-b93a-fa736f92a4ce"
},
"_N$dragonAtlasAsset": {
"__uuid__": "b59d0cc4-8ad1-4629-81f5-e15ae97f5cad"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "6bArt87wlCHLfLrP1inyjE"
},
{
"__type__": "cc.Node",
"_name": "layer_paopao",
......@@ -1481,16 +1586,16 @@
},
"_children": [
{
"__id__": 31
"__id__": 33
},
{
"__id__": 36
"__id__": 38
}
],
"_active": false,
"_components": [
{
"__id__": 38
"__id__": 40
}
],
"_prefab": null,
......@@ -1546,20 +1651,20 @@
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 30
"__id__": 32
},
"_children": [
{
"__id__": 32
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 34
"__id__": 36
},
{
"__id__": 35
"__id__": 37
}
],
"_prefab": null,
......@@ -1615,13 +1720,13 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 31
"__id__": 33
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 35
}
],
"_prefab": null,
......@@ -1677,7 +1782,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 34
},
"_enabled": true,
"_materials": [
......@@ -1709,7 +1814,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 33
},
"_enabled": true,
"_materials": [
......@@ -1741,12 +1846,12 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 33
},
"_enabled": true,
"_N$totalLength": 620,
"_N$barSprite": {
"__id__": 33
"__id__": 35
},
"_N$mode": 1,
"_N$progress": 1,
......@@ -1758,13 +1863,13 @@
"_name": "icon_tine",
"_objFlags": 0,
"_parent": {
"__id__": 30
"__id__": 32
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
"__id__": 39
}
],
"_prefab": null,
......@@ -1820,7 +1925,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
"__id__": 38
},
"_enabled": true,
"_materials": [
......@@ -1852,7 +1957,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 32
},
"_enabled": true,
"alignMode": 1,
......@@ -1882,23 +1987,23 @@
"__id__": 5
},
"_children": [
{
"__id__": 40
},
{
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
}
],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 48
},
{
"__id__": 47
"__id__": 49
}
],
"_prefab": null,
......@@ -1954,13 +2059,13 @@
"_name": "icon_vioce1",
"_objFlags": 0,
"_parent": {
"__id__": 39
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 41
"__id__": 43
}
],
"_prefab": null,
......@@ -2016,7 +2121,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
"__id__": 42
},
"_enabled": true,
"_materials": [
......@@ -2048,13 +2153,13 @@
"_name": "icon_vioce2",
"_objFlags": 0,
"_parent": {
"__id__": 39
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 43
"__id__": 45
}
],
"_prefab": null,
......@@ -2110,7 +2215,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
"__id__": 44
},
"_enabled": true,
"_materials": [
......@@ -2142,13 +2247,13 @@
"_name": "icon_vioce3",
"_objFlags": 0,
"_parent": {
"__id__": 39
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 47
}
],
"_prefab": null,
......@@ -2204,7 +2309,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 46
},
"_enabled": true,
"_materials": [
......@@ -2236,7 +2341,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"alignMode": 1,
......@@ -2263,7 +2368,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"_id": "521Hyul5BHpKpR8byKsIMv"
......@@ -2304,13 +2409,13 @@
},
"_children": [
{
"__id__": 50
"__id__": 52
},
{
"__id__": 53
"__id__": 55
},
{
"__id__": 56
"__id__": 58
}
],
"_active": false,
......@@ -2368,11 +2473,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [
{
"__id__": 51
"__id__": 53
}
],
"_active": true,
......@@ -2430,13 +2535,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 50
"__id__": 52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 54
}
],
"_prefab": null,
......@@ -2492,7 +2597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
"__id__": 53
},
"_enabled": true,
"_materials": [],
......@@ -2523,11 +2628,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [
{
"__id__": 54
"__id__": 56
}
],
"_active": true,
......@@ -2585,13 +2690,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 53
"__id__": 55
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 55
"__id__": 57
}
],
"_prefab": null,
......@@ -2647,7 +2752,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
"__id__": 56
},
"_enabled": true,
"_materials": [],
......@@ -2675,12 +2780,9 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 49
"__id__": 51
},
"_children": [
{
"__id__": 57
},
{
"__id__": 59
},
......@@ -2695,6 +2797,9 @@
},
{
"__id__": 67
},
{
"__id__": 69
}
],
"_active": true,
......@@ -2752,13 +2857,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 58
"__id__": 60
}
],
"_prefab": null,
......@@ -2814,7 +2919,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 59
},
"_enabled": true,
"_clip": {
......@@ -2833,13 +2938,13 @@
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 62
}
],
"_prefab": null,
......@@ -2895,7 +3000,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 61
},
"_enabled": true,
"_clip": {
......@@ -2914,13 +3019,13 @@
"_name": "create",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 62
"__id__": 64
}
],
"_prefab": null,
......@@ -2976,7 +3081,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
"__id__": 63
},
"_enabled": true,
"_clip": {
......@@ -2995,13 +3100,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 66
}
],
"_prefab": null,
......@@ -3057,7 +3162,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 65
},
"_enabled": true,
"_clip": {
......@@ -3076,13 +3181,13 @@
"_name": "fly",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 68
}
],
"_prefab": null,
......@@ -3138,7 +3243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 67
},
"_enabled": true,
"_clip": {
......@@ -3157,13 +3262,13 @@
"_name": "countdown",
"_objFlags": 0,
"_parent": {
"__id__": 56
"__id__": 58
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 70
}
],
"_prefab": null,
......@@ -3219,7 +3324,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 67
"__id__": 69
},
"_enabled": true,
"_clip": {
......
......@@ -151,7 +151,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let item = cc.instantiate(paoaoParent)
let pos = posArr[i];
layer_paopao.addChild(item)
this.updatePaoPao(item, data, pos);
this.updatePaoPao(item, data, pos, i);
}
pg.hw.playLocalAudio('fly')
this.scheduleOnce(() => {
......@@ -166,8 +166,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
return this.currentQuestion.options.filter(op => op.right);
}
updatePaoPao(item, data, pos) {
updatePaoPao(item, data, pos, i) {
let bubble = item.getChildByName("bubble")
let bg_img_0 = bubble.getChildByName('bg_img_0')
let bg_img_1 = bubble.getChildByName('bg_img_1')
let bg_img_2 = bubble.getChildByName('bg_img_2')
bg_img_0.active = i == 0;
bg_img_1.active = i == 1;
bg_img_2.active = i == 2;
let broken = item.getChildByName("bubble_broken")
let img = bubble.getChildByName("img")
let text = bubble.getChildByName("text")
......@@ -189,41 +195,53 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.x = pos.x;
item.y = pos.y - 1000
cc.tween(item).to(2, { y: pos.y }).call(() => { }).start();
let time = i == 1 ? 1.3 : i == 2 ? 1.6 : 2;//
cc.tween(item)
.to(time, { y: pos.y })
.to(0.3, { scaleY: 1.1, y: pos.y + 50 })
.to(0.3, { scaleY: 1, y: pos.y })
.call(() => {
}).start();
}
// 点击泡泡
touchPaoPao(e: any) {
if (!this.canTouch) return;
// 如果泡泡没有到指定位置不允许点击
let item = e.target;
let data = e.target.data;
// 成功 泡泡破碎 里面的内容消失
let bubble = e.target.getChildByName("bubble")
let broken = e.target.getChildByName("bubble_broken")
let right = e.target.getChildByName("bubble_right")
if (data.right) {
this.rightList.push(data);
cc.Tween.stopAllByTarget(item)
pg.view.visible(bubble, false)
pg.view.visible(broken, true)
pg.view.visible(right, true)
pg.hw.playLocalAudio('right')
pg.view.playDBAnimation(right, "newAnimation", 1)
cc.tween(item).delay(0.5).call(() => {
pg.hw.playLocalAudio('right')
}).by(0.5, { y: 1500 }).start();
this.rightList.push(data);
// 处理剩余的节点
if (this.rightList.length == this.currentRightList.length) {
let layer_paopao = pg.view.find(this, 'layer_game/layer_paopao')
let children = layer_paopao.children;
children.forEach(node => {
if (this.rightList.some(dt => node.data.id == dt.id)) return;
cc.tween(node).by(0.5, { y: -1500 }).start();
})
}
this.scheduleOnce(() => {
item.parent = null;
// 处理剩余的节点
if (this.rightList.length == this.currentRightList.length) {
cc.Tween.stopAll();
this.startCreate = false;
this.nextQuestion();
let layer_paopao = pg.view.find(this, 'layer_game/layer_paopao')
let children = layer_paopao.children;
children.forEach((node, i) => {
if (this.rightList.some(dt => node.data.id == dt.id)) return;
cc.tween(node).by(0.5 + (i / children.length) * 0.5, { y: -1500 }).start();
})
}
}, 1);
this.scheduleOnce(() => {
item.parent = null;
if (this.rightList.length == this.currentRightList.length) {
cc.Tween.stopAll();
this.startCreate = false;
this.nextQuestion();
}
}, 1);
}).by(0.5, { y: 1500 }).start();
} else {
pg.view.visible(bubble, false)
pg.view.visible(broken, true)
......
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