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

update bg sound

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