Commit 4002d6c7 authored by Vũ Gia Vương's avatar Vũ Gia Vương

update bg sound

parent b8509265
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 24 "__id__": 20
}, },
{ {
"__id__": 25 "__id__": 21
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -345,15 +345,13 @@ ...@@ -345,15 +345,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 18
}, },
{ {
"__id__": 22 "__id__": 19
} }
], ],
"_prefab": { "_prefab": null,
"__id__": 23
},
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
...@@ -364,8 +362,8 @@ ...@@ -364,8 +362,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1100, "width": 0,
"height": 2000 "height": 0
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -399,11 +397,11 @@ ...@@ -399,11 +397,11 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "dc5h/NJDlOIbUJv2pXpbTd" "_id": "f8CIJa8UFM2L3ayOqmqyTO"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "jar (2)", "_name": "jar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
...@@ -413,11 +411,12 @@ ...@@ -413,11 +411,12 @@
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 9
},
{
"__id__": 10
} }
], ],
"_prefab": { "_prefab": null,
"__id__": 10
},
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
...@@ -441,7 +440,7 @@ ...@@ -441,7 +440,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
109.777, 150,
0, 0,
0, 0,
0, 0,
...@@ -463,7 +462,7 @@ ...@@ -463,7 +462,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "a0VGncFKxODqUpkLRxEsto" "_id": "13OY/0WqBNc7hXRR/L1A+F"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -495,18 +494,17 @@ ...@@ -495,18 +494,17 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "acKa843RVJyI3hi7fey7jt" "_id": "d6/v6E1GJKI6thYeNNadhw"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "ba0b5Nq4fNP4KvnrykIXx3T",
"root": { "_name": "",
"__id__": 7 "_objFlags": 0,
}, "node": {
"asset": { "__id__": 8
"__uuid__": "88c28e89-077d-4fdc-bb6c-dfa486e59e47"
}, },
"fileId": "924ompSUhM5aP246rY6A1T", "_enabled": true,
"sync": false "_id": "20KHqiUvtDYr2ObUS7qj6F"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -523,12 +521,10 @@ ...@@ -523,12 +521,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 19 "__id__": 17
} }
], ],
"_prefab": { "_prefab": null,
"__id__": 20
},
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
...@@ -574,7 +570,7 @@ ...@@ -574,7 +570,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "f84P7OhF9AQp32rcF5O0hG" "_id": "fcKJwi8f9KhIiqSC7Ji8dv"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -591,15 +587,13 @@ ...@@ -591,15 +587,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 16 "__id__": 15
}, },
{ {
"__id__": 17 "__id__": 16
} }
], ],
"_prefab": { "_prefab": null,
"__id__": 18
},
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
...@@ -645,7 +639,7 @@ ...@@ -645,7 +639,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "fd8lHHRk1BXpxLeWCvM/ky" "_id": "47HO3ZbotOO43aKp4rJVNV"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -661,9 +655,7 @@ ...@@ -661,9 +655,7 @@
"__id__": 14 "__id__": 14
} }
], ],
"_prefab": { "_prefab": null,
"__id__": 15
},
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
...@@ -709,7 +701,7 @@ ...@@ -709,7 +701,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "2bgrjUFxtG2q5SZa3oe3r7" "_id": "96t7hyyopP6rYtOt/OAFxd"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -744,18 +736,7 @@ ...@@ -744,18 +736,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 1, "_N$overflow": 1,
"_N$cacheMode": 1, "_N$cacheMode": 1,
"_id": "f9OYHL5XFEA7xKVF1aGiEI" "_id": "a1mHA4RBFJ248dwjl+kdCc"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
},
"asset": {
"__uuid__": "88c28e89-077d-4fdc-bb6c-dfa486e59e47"
},
"fileId": "961GA0VSxFqpleKdc3Vmo0",
"sync": false
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -787,7 +768,7 @@ ...@@ -787,7 +768,7 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "875DROBPtFfLPZ0qGXV0vw" "_id": "d7RrxzZu5O26E+LNmx8Fyb"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -814,18 +795,7 @@ ...@@ -814,18 +795,7 @@
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 100, "_originalWidth": 100,
"_originalHeight": 40, "_originalHeight": 40,
"_id": "0eUYSAgTFOZYvfyrpp0qzn" "_id": "e9GFN+nmpKgZ0AP+pmhqho"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
},
"asset": {
"__uuid__": "88c28e89-077d-4fdc-bb6c-dfa486e59e47"
},
"fileId": "dfsK0p/qNKMKXBRe1nsKmL",
"sync": false
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
...@@ -907,18 +877,7 @@ ...@@ -907,18 +877,7 @@
"_N$target": { "_N$target": {
"__id__": 12 "__id__": 12
}, },
"_id": "0bkmWkZCVABKqifXoJym59" "_id": "f90tlUC7RA1YLuKG15c4Pu"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
},
"asset": {
"__uuid__": "88c28e89-077d-4fdc-bb6c-dfa486e59e47"
},
"fileId": "e9zGEyAx1JZ5qW4XuHKw8B",
"sync": false
}, },
{ {
"__type__": "4cdbdL97VxHIokBkhUMm2qL", "__type__": "4cdbdL97VxHIokBkhUMm2qL",
...@@ -931,7 +890,10 @@ ...@@ -931,7 +890,10 @@
"selectBtnNode": { "selectBtnNode": {
"__id__": 11 "__id__": 11
}, },
"_id": "afjIA9nctBQJ/Pdj7mvzVA" "backgroundMusic": {
"__uuid__": "a61f36bb-65e5-43e9-82b6-5a8d59050d31"
},
"_id": "45maHBUxRJZZuwRoPaDXFL"
}, },
{ {
"__type__": "cc.BlockInputEvents", "__type__": "cc.BlockInputEvents",
...@@ -941,18 +903,7 @@ ...@@ -941,18 +903,7 @@
"__id__": 7 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"_id": "66YcxC+oRGha005DWk6XF6" "_id": "45SawY9WtNFoz5vuln85q5"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 7
},
"asset": {
"__uuid__": "88c28e89-077d-4fdc-bb6c-dfa486e59e47"
},
"fileId": "",
"sync": false
}, },
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"height": 309, "height": 309,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"jar (2)": { "jar": {
"ver": "1.0.6", "ver": "1.0.6",
"uuid": "8e65fd28-69a0-4fc2-8f60-60825281f5cf", "uuid": "8e65fd28-69a0-4fc2-8f60-60825281f5cf",
"importer": "sprite-frame", "importer": "sprite-frame",
......
import { BEAT_GUILD, CHECK_FRAGMENT, CHECK_TOUCH, DROP_ALL_FRAGMENT, eventTarget, HAMMER, PLAY_BREAKING_SOUND, RESET_BOTTLE, RESET_FRAGMENT, SHAKE_FRAGMENT, SHOW_CARD_POPUP, SHOW_FOG, STOP_GUILD_TAP } from "../Events"; import { BEAT_GUILD, CHECK_FRAGMENT, CHECK_TOUCH, DROP_ALL_FRAGMENT, eventTarget, HAMMER, PLAY_BREAKING_SOUND, RESET_BOTTLE, RESET_FRAGMENT, SHAKE_FRAGMENT, SHOW_CARD_POPUP, SHOW_FOG, START_GUILD_TAP, STOP_GUILD_TAP } from "../Events";
import BehindFragment from "./BehindFragment"; import BehindFragment from "./BehindFragment";
import FragmentJarController from "./FragmentJarController"; import FragmentJarController from "./FragmentJarController";
...@@ -53,6 +53,11 @@ export default class BreakingJarController extends cc.Component { ...@@ -53,6 +53,11 @@ export default class BreakingJarController extends cc.Component {
this.initFog(); this.initFog();
} }
protected start(): void {
this.resetHammer();
eventTarget.emit(START_GUILD_TAP);
}
private initFog() { private initFog() {
this.particleBehind.node.active = false; this.particleBehind.node.active = false;
this.particleFont.node.active = false; this.particleFont.node.active = false;
...@@ -121,10 +126,6 @@ export default class BreakingJarController extends cc.Component { ...@@ -121,10 +126,6 @@ export default class BreakingJarController extends cc.Component {
this.onHammer(cc.v2(-50, -50)); this.onHammer(cc.v2(-50, -50));
} }
protected start(): void {
this.resetHammer();
}
private resetBottle() { private resetBottle() {
this._countFragment = 0; this._countFragment = 0;
this._bodyFragments = []; this._bodyFragments = [];
...@@ -180,7 +181,7 @@ export default class BreakingJarController extends cc.Component { ...@@ -180,7 +181,7 @@ export default class BreakingJarController extends cc.Component {
if (!this._isBreak) { if (!this._isBreak) {
return; return;
} }
eventTarget.emit(CHECK_TOUCH, nodePos); eventTarget.emit(CHECK_TOUCH, nodePos);
this._isBreak = false; this._isBreak = false;
this.scheduleOnce(() => this._isBreak = true, 0.5); this.scheduleOnce(() => this._isBreak = true, 0.5);
......
...@@ -5,10 +5,16 @@ const { ccclass, property } = cc._decorator; ...@@ -5,10 +5,16 @@ const { ccclass, property } = cc._decorator;
export default class StartScreen extends cc.Component { export default class StartScreen extends cc.Component {
@property(cc.Node) @property(cc.Node)
private selectBtnNode: cc.Node = null; private selectBtnNode: cc.Node = null;
@property(cc.AudioClip)
private backgroundMusic: cc.AudioClip = null;
protected onLoad(): void { protected onLoad(): void {
this.selectBtnNode.on('click', this.onSelectBtnClick, this); this.selectBtnNode.on('click', this.onSelectBtnClick, this);
// cc.director.preloadScene('main'); cc.director.preloadScene('main');
if (!cc.audioEngine.isMusicPlaying()) {
cc.audioEngine.playMusic(this.backgroundMusic, true);
}
} }
private onSelectBtnClick() { private onSelectBtnClick() {
......
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