Commit 9a587c3b authored by linzhiguo's avatar linzhiguo

+ 替换声音

+ dizzy | laugh 声音逻辑
parent c5b38590
{
"ver": "2.0.1",
"uuid": "12c5ce05-d467-4159-b294-1a7e176fa47f",
"uuid": "333f0144-0c45-43dc-99c7-190370f383c7",
"downloadMode": 0,
"duration": 0.5774,
"duration": 0.52925,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "739e4493-58ce-461b-830c-c89693d0a9d9",
"uuid": "2e778a81-9229-427b-9a1c-72cbacd4b697",
"downloadMode": 0,
"duration": 1.802449,
"duration": 0.711688,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "f0ae7fac-6c6a-45a4-a4a4-92bc980fbccd",
"downloadMode": 0,
"duration": 0.066485,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7b77784e-89a9-43fc-a398-1dbf726a58f5",
"downloadMode": 0,
"duration": 0.601995,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "5a475a7e-8f7a-4074-aaa8-6b6c7a9a4458",
"uuid": "5b834df8-23b6-4261-8bf1-8f4ad55a1f87",
"downloadMode": 0,
"duration": 3.787755,
"duration": 2.298776,
"subMetas": {}
}
\ No newline at end of file
......@@ -13436,6 +13436,12 @@
},
{
"__id__": 255
},
{
"__id__": 257
},
{
"__id__": 259
}
],
"_active": true,
......@@ -13559,7 +13565,7 @@
},
"_enabled": true,
"_clip": {
"__uuid__": "12c5ce05-d467-4159-b294-1a7e176fa47f"
"__uuid__": "333f0144-0c45-43dc-99c7-190370f383c7"
},
"_volume": 1,
"_mute": false,
......@@ -13640,7 +13646,7 @@
},
"_enabled": true,
"_clip": {
"__uuid__": "739e4493-58ce-461b-830c-c89693d0a9d9"
"__uuid__": "f0ae7fac-6c6a-45a4-a4a4-92bc980fbccd"
},
"_volume": 1,
"_mute": false,
......@@ -13802,7 +13808,7 @@
},
"_enabled": true,
"_clip": {
"__uuid__": "5a475a7e-8f7a-4074-aaa8-6b6c7a9a4458"
"__uuid__": "5b834df8-23b6-4261-8bf1-8f4ad55a1f87"
},
"_volume": 1,
"_mute": false,
......@@ -13811,5 +13817,167 @@
"playOnLoad": false,
"preload": false,
"_id": "42GzSK6OFIc5i+/l2D/16o"
},
{
"__type__": "cc.Node",
"_name": "dizzy",
"_objFlags": 0,
"_parent": {
"__id__": 248
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 258
}
],
"_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": "d4psfVHOhH6ZHl7wJbpbSa"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 257
},
"_enabled": true,
"_clip": {
"__uuid__": "2e778a81-9229-427b-9a1c-72cbacd4b697"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "59zYOuHEdJ8qrAlYwd9GAY"
},
{
"__type__": "cc.Node",
"_name": "laugh",
"_objFlags": 0,
"_parent": {
"__id__": 248
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 260
}
],
"_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": "2e+jPAejZOUrP48kn5e1UM"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 259
},
"_enabled": true,
"_clip": {
"__uuid__": "7b77784e-89a9-43fc-a398-1dbf726a58f5"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "1d4PhMnNBCDaFKYmaJ2A0S"
}
]
\ No newline at end of file
......@@ -198,7 +198,15 @@ cc.Class({
this._hammer.x = pos.x;
this._hammer.y = pos.y;
this._touched = false;
this.playAudioByName('correct');
this.playAudioByName('correct', ()=>{
});
cc.tween(item)
.delay(0.5)
.call(()=>{
this.playAudioByName('dizzy');
})
.start();
playDragonBoneAnimation(this._hammer.children[0], 'normal', 1, ()=>{
this._hammer.y = -1000;
this.hitMouse(item);
......@@ -212,6 +220,7 @@ cc.Class({
this._hammer.x = pos.x;
this._hammer.y = pos.y;
this.playAudioByName('incorrect');
playDragonBoneAnimation(this._hammer.children[0], 'normal', 1, ()=>{
this._hammer.y = -1000;
});
......@@ -220,6 +229,16 @@ cc.Class({
}, this);
},
setLaughAni(){
this._laugh = cc.tween(this.title.node)
.delay(3)
.call(()=>{
this.playAudioByName('laugh');
this.setLaughAni();
})
.start();
},
playGame(){
this.updateFlagArea(()=>{
this.playAudioByName('time321');
......@@ -274,6 +293,7 @@ cc.Class({
mouse.audio = info.audio_url;
mouse.playAudio();
this.moveUp(mouse.node, ()=>{
this.setLaughAni();
this._time_ani = cc.tween(this.node)
.delay(this.data.time)
.call(()=>{
......@@ -312,6 +332,11 @@ cc.Class({
this._time_ani.stop();
this._time_ani = null;
}
if (this._laugh){
this._laugh.stop();
this._laugh = null;
}
let mouse = node.getComponent(cc.js.getClassByName('Mouse'));
mouse.hit();
......@@ -343,6 +368,11 @@ cc.Class({
},
tryFinished(){
if (this._laugh){
this._laugh.stop();
this._laugh = null;
}
this._flag_index ++;
if (this._flag_index >= this.data.mouses.length){
//console.log("over");
......
export const defaultData =
{"mouses":[{"word":"a","audio_url":"http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3"},{"word":"O"},{"word":"u","audio_url":"http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3"},{"word":"i","audio_url":"http://staging-teach.cdn.ireadabc.com/43349451985083b94a58c6870b49f115.mp3"},{"word":"E"},{"word":"Y","audio_url":"http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3"}],"title":"weioewowe","time":"4","audio_url":"http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3"}
;
{
"mouses": [
{
"word": "a",
"audio_url": "http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3"
},
{
"word": "O"
},
{
"word": "u",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3"
},
{
"word": "i",
"audio_url": "http://staging-teach.cdn.ireadabc.com/43349451985083b94a58c6870b49f115.mp3"
},
{
"word": "E"
},
{
"word": "Y",
"audio_url": "http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3"
}
],
"title": "weioewowe",
"time": "10",
"audio_url": "http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3"
}
\ 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