Commit d1de056a authored by Lwd's avatar Lwd

aaaa

parent 6a222b89
......@@ -75,22 +75,22 @@
"__id__": 5
},
{
"__id__": 184
"__id__": 186
}
],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 188
},
{
"__id__": 187
"__id__": 189
},
{
"__id__": 188
"__id__": 190
},
{
"__id__": 189
"__id__": 191
}
],
"_prefab": null,
......@@ -180,7 +180,7 @@
"array": [
0,
0,
539.5338265577053,
276.2621038072359,
0,
0,
0,
......@@ -7820,6 +7820,9 @@
"_components": [
{
"__id__": 183
},
{
"__id__": 184
}
],
"_prefab": null,
......@@ -7880,6 +7883,88 @@
"_enabled": true,
"_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",
"_name": "speaker",
......@@ -7891,7 +7976,7 @@
"_active": true,
"_components": [
{
"__id__": 185
"__id__": 187
}
],
"_prefab": null,
......@@ -7947,7 +8032,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 184
"__id__": 186
},
"_enabled": true,
"eff_btn": {
......@@ -8077,7 +8162,7 @@
}
],
"canvasView": {
"__id__": 186
"__id__": 188
},
"isCanvas": true,
"_id": "5eOVDDzARGnoMLcNXyk5ml"
......
......@@ -216,14 +216,32 @@ var game = cc.Class({
},
//播放标题音效
playAudioTitle: function () {
playAudioTitle: function (cb) {
//获得播放路径
var path = g.data_mgr.data.contentObj.audio_url;
if (path == undefined) {
cb && cb();
}
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) {
if (listInfo.length <= i) {
......
......@@ -64,7 +64,7 @@ var speaker = cc.Class({
g.snd_mgr.playEffect(this.eff_showPop);
},
//游戏开始
play_start: function () {
g.snd_mgr.playEffect(this.eff_start);
play_start: function (cb) {
g.snd_mgr.playEffect(this.eff_start, cb);
},
});
......@@ -115,16 +115,24 @@ g.data_mgr = {
//更新游戏界面信息
g.game.inst.UpdataUi();
//播放游戏开始音效
g.speaker.inst.play_start();
setTimeout(() => {
g.game.inst.playAudioTitle();
}, 2000);
setTimeout(() => {
g.game.inst.mask_node.active = false;
//游戏开始
g.game.inst.gameStart();
}, 4000)
g.game.inst.isLoadEnd = true;
// g.speaker.inst.play_start(() => {
// g.game.inst.playAudioTitle(() => {
// g.game.inst.mask_node.active = false;
// //游戏开始
// g.game.inst.gameStart();
// });
// });
// //播放游戏开始音效
// g.speaker.inst.play_start();
// 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