Commit 58284ff8 authored by linzhiguo's avatar linzhiguo

+ 321 开场

+ 增加几个音效
parent 4350d553
{ {
"ver": "2.0.1", "ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b", "uuid": "514e24a6-4a9b-4a5c-9250-6e11f297b0d0",
"downloadMode": 0, "downloadMode": 0,
"duration": 0.130612, "duration": 0.5774,
"subMetas": {} "subMetas": {}
} }
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "549152ab-1dde-49e3-9240-0e428ac6f29a",
"downloadMode": 0,
"duration": 0.711688,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "1c63bc28-619a-472f-af67-9263b9535165",
"downloadMode": 0,
"duration": 1.802449,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "b13ae152-f1bb-43b9-8784-a50dee754e38",
"downloadMode": 0,
"duration": 4,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "8c14b3b8-8840-4464-bfee-0e9e1e70aac2",
"downloadMode": 0,
"duration": 3.787755,
"subMetas": {}
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 107 "__id__": 113
} }
], ],
"_active": false, "_active": false,
...@@ -82,18 +82,21 @@ ...@@ -82,18 +82,21 @@
}, },
{ {
"__id__": 101 "__id__": 101
},
{
"__id__": 104
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 104 "__id__": 110
}, },
{ {
"__id__": 105 "__id__": 111
}, },
{ {
"__id__": 106 "__id__": 112
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5177,6 +5180,246 @@ ...@@ -5177,6 +5180,246 @@
"_originalHeight": 0, "_originalHeight": 0,
"_id": "58BM7ZnhxOh4WrpoVlaZB9" "_id": "58BM7ZnhxOh4WrpoVlaZB9"
}, },
{
"__type__": "cc.Node",
"_name": "timer",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 105
}
],
"_active": false,
"_components": [
{
"__id__": 108
},
{
"__id__": 109
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 221.78,
"height": 408.88
},
"_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": "1eUZjVCX1J27F7DTxGJW1d"
},
{
"__type__": "cc.Node",
"_name": "New Label copy",
"_objFlags": 0,
"_parent": {
"__id__": 104
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 106
},
{
"__id__": 107
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 242,
"b": 94,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 199.78,
"height": 386.88
},
"_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": "12NAu45KBAU7WxQ2hIASuj"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 105
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "3",
"_N$string": "3",
"_fontSize": 288,
"_lineHeight": 288,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "954a1831-f11e-4448-b641-0e4a2d830e57"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "e4r8AhmuFGwaL4w3uT4+3d"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 105
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 13,
"g": 166,
"b": 204,
"a": 255
},
"_width": 12,
"_id": "2eUAnIrMRLTb8D+oyCEht6"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "3",
"_N$string": "3",
"_fontSize": 288,
"_lineHeight": 288,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "954a1831-f11e-4448-b641-0e4a2d830e57"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "47K9A1nt1JNLeY9dxk7Brv"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_width": 23,
"_id": "18KpZ5HgxA2JcSE8CdIA4V"
},
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
"_name": "", "_name": "",
...@@ -5275,13 +5518,13 @@ ...@@ -5275,13 +5518,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 108 "__id__": 114
}, },
{ {
"__id__": 113 "__id__": 119
}, },
{ {
"__id__": 116 "__id__": 130
} }
], ],
"_active": true, "_active": true,
...@@ -5339,11 +5582,11 @@ ...@@ -5339,11 +5582,11 @@
"_name": "img", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 107 "__id__": 113
}, },
"_children": [ "_children": [
{ {
"__id__": 109 "__id__": 115
} }
], ],
"_active": true, "_active": true,
...@@ -5401,17 +5644,17 @@ ...@@ -5401,17 +5644,17 @@
"_name": "flyswatter", "_name": "flyswatter",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 108 "__id__": 114
}, },
"_children": [ "_children": [
{ {
"__id__": 110 "__id__": 116
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 112 "__id__": 118
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5467,13 +5710,13 @@ ...@@ -5467,13 +5710,13 @@
"_name": "icon_1", "_name": "icon_1",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 109 "__id__": 115
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 111 "__id__": 117
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5529,7 +5772,7 @@ ...@@ -5529,7 +5772,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 110 "__id__": 116
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5561,7 +5804,7 @@ ...@@ -5561,7 +5804,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 109 "__id__": 115
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5593,11 +5836,23 @@ ...@@ -5593,11 +5836,23 @@
"_name": "audio", "_name": "audio",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 107 "__id__": 113
}, },
"_children": [ "_children": [
{ {
"__id__": 114 "__id__": 120
},
{
"__id__": 122
},
{
"__id__": 124
},
{
"__id__": 126
},
{
"__id__": 128
} }
], ],
"_active": true, "_active": true,
...@@ -5652,16 +5907,16 @@ ...@@ -5652,16 +5907,16 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn", "_name": "correct",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 113 "__id__": 119
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 115 "__id__": 121
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5717,11 +5972,11 @@ ...@@ -5717,11 +5972,11 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 114 "__id__": 120
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
"__uuid__": "f0680ae0-c079-45ef-abd7-9e63d90b982b" "__uuid__": "514e24a6-4a9b-4a5c-9250-6e11f297b0d0"
}, },
"_volume": 1, "_volume": 1,
"_mute": false, "_mute": false,
...@@ -5733,10 +5988,334 @@ ...@@ -5733,10 +5988,334 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "time", "_name": "dizzy",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 107 "__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 123
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": "80aexA2uBKT7xtLpeq3/db"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 122
},
"_enabled": true,
"_clip": {
"__uuid__": "549152ab-1dde-49e3-9240-0e428ac6f29a"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "04khR3CoVP0p586u0+++24"
},
{
"__type__": "cc.Node",
"_name": "incorrect",
"_objFlags": 0,
"_parent": {
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 125
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": "bdQ+HdCf1HerHqbwFHNz8Q"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"_clip": {
"__uuid__": "1c63bc28-619a-472f-af67-9263b9535165"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "5dTR768Q9OyqHbwFySRx/W"
},
{
"__type__": "cc.Node",
"_name": "time321",
"_objFlags": 0,
"_parent": {
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 127
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": "1bWe/zJvxGC61yVw/cst2v"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 126
},
"_enabled": true,
"_clip": {
"__uuid__": "b13ae152-f1bb-43b9-8784-a50dee754e38"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "54JLEJ6SNPxbtOsiZaVQlt"
},
{
"__type__": "cc.Node",
"_name": "victory",
"_objFlags": 0,
"_parent": {
"__id__": 119
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 129
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_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": "57r162/VhJs4MtppiRwfa8"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
},
"_enabled": true,
"_clip": {
"__uuid__": "8c14b3b8-8840-4464-bfee-0e9e1e70aac2"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "83CoCEd6FG7YVTnYdDV8yo"
},
{
"__type__": "cc.Node",
"_name": "time",
"_objFlags": 0,
"_parent": {
"__id__": 113
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
......
...@@ -129,6 +129,10 @@ cc.Class({ ...@@ -129,6 +129,10 @@ cc.Class({
this._flyswatter = cc.find('Canvas/flyswatter'); this._flyswatter = cc.find('Canvas/flyswatter');
this.setOrignPos(this._flyswatter); this.setOrignPos(this._flyswatter);
let node = cc.find('Canvas/timer');
this._time_text = node.getComponent(cc.Label);
this._time_text.sub = node.children[0].getComponent(cc.Label);
}, },
cleanFlys(){ cleanFlys(){
...@@ -256,6 +260,7 @@ cc.Class({ ...@@ -256,6 +260,7 @@ cc.Class({
for(let i = 0; i < 2; i++){ for(let i = 0; i < 2; i++){
item = this.flys[i]; item = this.flys[i];
if (cc.rect(item.getBoundingBoxToWorld()).contains(event.touch._point)){ if (cc.rect(item.getBoundingBoxToWorld()).contains(event.touch._point)){
this.playAudioByName('dizzy');
this.cleanTimer(); this.cleanTimer();
this._flyswatter.x = pos.x; this._flyswatter.x = pos.x;
this._flyswatter.y = pos.y; this._flyswatter.y = pos.y;
...@@ -296,6 +301,12 @@ cc.Class({ ...@@ -296,6 +301,12 @@ cc.Class({
}, },
playGame(){ playGame(){
this.playTimer(()=>{
this.startItem();
});
},
startItem(){
this._sound_button._sprite.active = true; this._sound_button._sprite.active = true;
let item = this.data[this._index]; let item = this.data[this._index];
...@@ -310,6 +321,38 @@ cc.Class({ ...@@ -310,6 +321,38 @@ cc.Class({
}); });
}, },
playTimer(cb){
this.playAudioByName('time321');
this._time_text.node.active = true;
this.setTimerString('3');
cc.tween(this._time_text.node)
.to(0.25, {scale: 1.2},{ easing: 'quadIn' })
.to(0.5, {scale: 0.8},{ easing: 'quadOut' })
.to(0.25, {scale: 1},{ easing: 'quadIn' })
.call(()=>{
this.setTimerString(2);
})
.to(0.25, {scale: 1.2},{ easing: 'quadIn' })
.to(0.5, {scale: 0.8},{ easing: 'quadOut' })
.to(0.25, {scale: 1},{ easing: 'quadIn' })
.call(()=>{
this.setTimerString(1);
})
.to(0.25, {scale: 1.2},{ easing: 'quadIn' })
.to(0.5, {scale: 0.8},{ easing: 'quadOut' })
.to(0.25, {scale: 1},{ easing: 'quadIn' })
.call(()=>{
this._time_text.node.active = false;
cb && cb();
})
.start();
},
setTimerString(str){
this._time_text.string = str;
this._time_text.sub.string = str;
},
setTimer(){ setTimer(){
this._current_time = this._time_node.x; this._current_time = this._time_node.x;
this._timer_ani = cc.tween(this._time_node) this._timer_ani = cc.tween(this._time_node)
...@@ -427,7 +470,7 @@ cc.Class({ ...@@ -427,7 +470,7 @@ cc.Class({
this._index ++; this._index ++;
if (this._index >= this.data.length){ if (this._index >= this.data.length){
//this.playAudioByName('victory'); this.playAudioByName('victory');
this._flower.active = true; this._flower.active = true;
playDragonBoneAnimation(this._flower, 'normal'); playDragonBoneAnimation(this._flower, 'normal');
return; return;
...@@ -526,7 +569,7 @@ cc.Class({ ...@@ -526,7 +569,7 @@ cc.Class({
cc.tween(this._cup) cc.tween(this._cup)
.to(0.8, {y: this._cup._y}, { easing: 'quadOut' }) .to(0.8, {y: this._cup._y}, { easing: 'quadOut' })
.call(()=>{ .call(()=>{
this.playGame(); this.startItem();
}) })
.start(); .start();
}, },
......
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