Commit d1de056a authored by Lwd's avatar Lwd

aaaa

parent 6a222b89
...@@ -75,22 +75,22 @@ ...@@ -75,22 +75,22 @@
"__id__": 5 "__id__": 5
}, },
{ {
"__id__": 184 "__id__": 186
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 186 "__id__": 188
}, },
{ {
"__id__": 187 "__id__": 189
}, },
{ {
"__id__": 188 "__id__": 190
}, },
{ {
"__id__": 189 "__id__": 191
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
"array": [ "array": [
0, 0,
0, 0,
539.5338265577053, 276.2621038072359,
0, 0,
0, 0,
0, 0,
...@@ -7820,6 +7820,9 @@ ...@@ -7820,6 +7820,9 @@
"_components": [ "_components": [
{ {
"__id__": 183 "__id__": 183
},
{
"__id__": 184
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7880,6 +7883,88 @@ ...@@ -7880,6 +7883,88 @@
"_enabled": true, "_enabled": true,
"_id": "80PylZIy9EbJR4/AZl0xgK" "_id": "80PylZIy9EbJR4/AZl0xgK"
}, },
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 182
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 185
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "cc1qEGA9pIR5pCangYCuxP"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "8b0b7lMf15OlIK40chbxp64",
"handler": "onBtnMask",
"customEventData": ""
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "speaker", "_name": "speaker",
...@@ -7891,7 +7976,7 @@ ...@@ -7891,7 +7976,7 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 185 "__id__": 187
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7947,7 +8032,7 @@ ...@@ -7947,7 +8032,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 184 "__id__": 186
}, },
"_enabled": true, "_enabled": true,
"eff_btn": { "eff_btn": {
...@@ -8077,7 +8162,7 @@ ...@@ -8077,7 +8162,7 @@
} }
], ],
"canvasView": { "canvasView": {
"__id__": 186 "__id__": 188
}, },
"isCanvas": true, "isCanvas": true,
"_id": "5eOVDDzARGnoMLcNXyk5ml" "_id": "5eOVDDzARGnoMLcNXyk5ml"
......
...@@ -216,14 +216,32 @@ var game = cc.Class({ ...@@ -216,14 +216,32 @@ var game = cc.Class({
}, },
//播放标题音效 //播放标题音效
playAudioTitle: function () { playAudioTitle: function (cb) {
//获得播放路径 //获得播放路径
var path = g.data_mgr.data.contentObj.audio_url; var path = g.data_mgr.data.contentObj.audio_url;
if (path == undefined) {
cb && cb();
}
g.res_mgr.playAudioByUrl(path, (url) => { g.res_mgr.playAudioByUrl(path, (url) => {
g.snd_mgr.playEffect(url); g.snd_mgr.playEffect(url, cb);
}); });
}, },
onBtnMask: function () {
if (this.isLoadEnd) {
this.isLoadEnd = false;
g.speaker.inst.play_start(() => {
setTimeout(() => {
g.game.inst.playAudioTitle(() => {
g.game.inst.mask_node.active = false;
//游戏开始
g.game.inst.gameStart();
});
}, 500)
});
}
},
//添加项 //添加项
addItem: function (listInfo, content, item, i) { addItem: function (listInfo, content, item, i) {
if (listInfo.length <= i) { if (listInfo.length <= i) {
......
...@@ -64,7 +64,7 @@ var speaker = cc.Class({ ...@@ -64,7 +64,7 @@ var speaker = cc.Class({
g.snd_mgr.playEffect(this.eff_showPop); g.snd_mgr.playEffect(this.eff_showPop);
}, },
//游戏开始 //游戏开始
play_start: function () { play_start: function (cb) {
g.snd_mgr.playEffect(this.eff_start); g.snd_mgr.playEffect(this.eff_start, cb);
}, },
}); });
...@@ -115,16 +115,24 @@ g.data_mgr = { ...@@ -115,16 +115,24 @@ g.data_mgr = {
//更新游戏界面信息 //更新游戏界面信息
g.game.inst.UpdataUi(); g.game.inst.UpdataUi();
//播放游戏开始音效 g.game.inst.isLoadEnd = true;
g.speaker.inst.play_start(); // g.speaker.inst.play_start(() => {
setTimeout(() => { // g.game.inst.playAudioTitle(() => {
g.game.inst.playAudioTitle(); // g.game.inst.mask_node.active = false;
}, 2000); // //游戏开始
// g.game.inst.gameStart();
setTimeout(() => { // });
g.game.inst.mask_node.active = false; // });
//游戏开始 // //播放游戏开始音效
g.game.inst.gameStart(); // g.speaker.inst.play_start();
}, 4000) // setTimeout(() => {
// g.game.inst.playAudioTitle();
// }, 2000);
//setTimeout(() => {
// g.game.inst.mask_node.active = false;
// //游戏开始
// g.game.inst.gameStart();
//}, 4000)
}, },
} }
\ 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