feat: update sound

feature/ads-smart-display
tiendat3699 2024-06-14 18:22:53 +07:00
parent caf9371c1e
commit e87665ae39
62 changed files with 297 additions and 22 deletions

View File

@ -3322,6 +3322,20 @@
7, 7,
8 8
], ],
"sounds": [
{
"__uuid__": "b8b7fa90-6043-4754-8905-4c925f86124c",
"__expectedType__": "cc.AudioClip"
},
{
"__uuid__": "89ed611c-6a3e-4bb9-8901-74f3c1404a6d",
"__expectedType__": "cc.AudioClip"
},
{
"__uuid__": "fcc434e0-f727-44ab-94a4-2b1274c08f99",
"__expectedType__": "cc.AudioClip"
}
],
"_id": "" "_id": ""
}, },
{ {

View File

@ -1280,11 +1280,11 @@
"__id__": 6 "__id__": 6
}, },
"_impactSound": { "_impactSound": {
"__uuid__": "b122d38e-ecf1-42e2-8b26-c09d306d90d9", "__uuid__": "f5e98c1a-b637-4c08-96dd-7de6e635dc62",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_impactFlipperSound": { "_impactFlipperSound": {
"__uuid__": "a76cc94a-6331-47e7-b8aa-0caeea6a79eb", "__uuid__": "7b8c7e6e-9d0f-45ec-8cc2-adb6b67c9617",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_collectSound": { "_collectSound": {
@ -1857,7 +1857,8 @@
"asset": null, "asset": null,
"fileId": "deONawRBBB+5cOhOxIqx+a", "fileId": "deONawRBBB+5cOhOxIqx+a",
"instance": null, "instance": null,
"targetOverrides": null "targetOverrides": null,
"nestedPrefabInstanceRoots": null
}, },
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",

View File

@ -1002,6 +1002,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "84py8yOJVJWZOHcC5itxPh", "fileId": "84py8yOJVJWZOHcC5itxPh",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@ -1293,7 +1295,7 @@
"__id__": 88 "__id__": 88
}, },
"_collectSound": { "_collectSound": {
"__uuid__": "05a2671e-35bb-4be0-9244-43d541b9a26a", "__uuid__": "8c6929be-5d11-49a6-887f-60cccdd60999",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_animation": { "_animation": {

View File

@ -1127,7 +1127,7 @@
"__id__": 80 "__id__": 80
}, },
"_collectSound": { "_collectSound": {
"__uuid__": "1ac12acc-dde3-4d31-9106-dfc30c030d40", "__uuid__": "ca7dc97e-d8a6-43f4-922d-14a2b5422cd6",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_animation": { "_animation": {

View File

@ -1127,7 +1127,7 @@
"__id__": 80 "__id__": 80
}, },
"_collectSound": { "_collectSound": {
"__uuid__": "1ac12acc-dde3-4d31-9106-dfc30c030d40", "__uuid__": "ca7dc97e-d8a6-43f4-922d-14a2b5422cd6",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_animation": { "_animation": {

View File

@ -1127,7 +1127,7 @@
"__id__": 80 "__id__": 80
}, },
"_collectSound": { "_collectSound": {
"__uuid__": "1ac12acc-dde3-4d31-9106-dfc30c030d40", "__uuid__": "ca7dc97e-d8a6-43f4-922d-14a2b5422cd6",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_animation": { "_animation": {

View File

@ -1127,7 +1127,7 @@
"__id__": 80 "__id__": 80
}, },
"_collectSound": { "_collectSound": {
"__uuid__": "1ac12acc-dde3-4d31-9106-dfc30c030d40", "__uuid__": "ca7dc97e-d8a6-43f4-922d-14a2b5422cd6",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_animation": { "_animation": {

View File

@ -6132,7 +6132,7 @@
"__id__": 629 "__id__": 629
}, },
"_goalSound": { "_goalSound": {
"__uuid__": "4ce9d2c6-98c5-4d05-94af-70193bb795fe", "__uuid__": "0f71123d-e160-42af-92ca-05be1751dccc",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_cheeseModeGoalSound": { "_cheeseModeGoalSound": {
@ -22765,7 +22765,7 @@
"_motorSpeedDeActive": 10000, "_motorSpeedDeActive": 10000,
"side": 0, "side": 0,
"_activeSound": { "_activeSound": {
"__uuid__": "ac21d2c4-7749-4701-af6a-b4ac4b43e7a5", "__uuid__": "5fc9d817-c8bc-460a-8de4-08d23ae0bbd5",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_id": "dbyGJf4ZlNuqnbz9gSPD7E" "_id": "dbyGJf4ZlNuqnbz9gSPD7E"
@ -23352,7 +23352,7 @@
"_motorSpeedDeActive": -10000, "_motorSpeedDeActive": -10000,
"side": 1, "side": 1,
"_activeSound": { "_activeSound": {
"__uuid__": "ac21d2c4-7749-4701-af6a-b4ac4b43e7a5", "__uuid__": "5fc9d817-c8bc-460a-8de4-08d23ae0bbd5",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_id": "c2LBQkbqpMS7ebeAdAWNd2" "_id": "c2LBQkbqpMS7ebeAdAWNd2"
@ -23939,7 +23939,7 @@
"_motorSpeedDeActive": -10000, "_motorSpeedDeActive": -10000,
"side": 1, "side": 1,
"_activeSound": { "_activeSound": {
"__uuid__": "ac21d2c4-7749-4701-af6a-b4ac4b43e7a5", "__uuid__": "5fc9d817-c8bc-460a-8de4-08d23ae0bbd5",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_id": "14hqKrgTVA0r/f0mOYZ/aP" "_id": "14hqKrgTVA0r/f0mOYZ/aP"
@ -24511,7 +24511,7 @@
"_motorSpeedDeActive": 10000, "_motorSpeedDeActive": 10000,
"side": 0, "side": 0,
"_activeSound": { "_activeSound": {
"__uuid__": "ac21d2c4-7749-4701-af6a-b4ac4b43e7a5", "__uuid__": "5fc9d817-c8bc-460a-8de4-08d23ae0bbd5",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_id": "a3/6ZctnhAFb+E8W1w8jJR" "_id": "a3/6ZctnhAFb+E8W1w8jJR"
@ -34895,25 +34895,25 @@
"y": -1200, "y": -1200,
"z": 0 "z": 0
}, },
"_timePlay": 20, "_timePlay": 120,
"_clockIcon": { "_clockIcon": {
"__uuid__": "f7bd5166-9d5f-4d43-a3d3-58ae9a4957fc@f9941", "__uuid__": "f7bd5166-9d5f-4d43-a3d3-58ae9a4957fc@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_startSound": { "_startSound": {
"__uuid__": "015d5eb5-b790-46d8-a580-b35ecb94caf3", "__uuid__": "22f51dba-6b7d-4b07-a79f-6157a5a0536a",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_ballOutSound": { "_ballOutSound": {
"__uuid__": "90fc5275-7ce7-4e86-a757-0674c4fe8f18", "__uuid__": "d8a8da5c-fb75-46a2-8ac1-ce00b40fc695",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_backgroundMusic": { "_backgroundMusic": {
"__uuid__": "991a1a79-af50-4266-8338-fbfba71e8a43", "__uuid__": "120fc044-d116-4636-9498-608e244d5015",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_gameOverMusic": { "_gameOverMusic": {
"__uuid__": "4fa2b9e5-1ded-4a31-8a39-7a87a7fce810", "__uuid__": "d09c6ddf-cddb-4c36-b4ae-e106ecf4743f",
"__expectedType__": "cc.AudioClip" "__expectedType__": "cc.AudioClip"
}, },
"_id": "94qg9r7nVDkbO1S3Aid8/t" "_id": "94qg9r7nVDkbO1S3Aid8/t"

View File

@ -1,6 +1,7 @@
import { _decorator, Component, Label, Node, sp, Sprite, SpriteFrame, tween, Vec3 } from 'cc'; import { _decorator, AudioClip, Component, Label, Node, sp, Sprite, SpriteFrame, tween, Vec3 } from 'cc';
import GachaBase from '../Base/GachaBase'; import GachaBase from '../Base/GachaBase';
import SpineAnimationHandler, { SocketPath, SpineAnimation, SpineSkin } from '../Base/SpineAnimationHandler'; import SpineAnimationHandler, { SocketPath, SpineAnimation, SpineSkin } from '../Base/SpineAnimationHandler';
import AudioManager from '../Manager/AudioManager';
import GachaManager, { RewardConfig } from '../Manager/GachaManager'; import GachaManager, { RewardConfig } from '../Manager/GachaManager';
import Utils from '../Utilities'; import Utils from '../Utilities';
@ -31,6 +32,8 @@ export default class LuckyChain extends GachaBase {
private cards: Node[] = []; private cards: Node[] = [];
@property({ type: SocketPath }) @property({ type: SocketPath })
private cardSlotPath: SocketPath[] = []; private cardSlotPath: SocketPath[] = [];
@property(AudioClip)
private sounds: AudioClip[] = [];
private _activeCards: RewardCard[] = []; private _activeCards: RewardCard[] = [];
private _allCards: RewardCard[] = []; private _allCards: RewardCard[] = [];
@ -54,11 +57,13 @@ export default class LuckyChain extends GachaBase {
this.animationHandler.setListener((_, e) => { this.animationHandler.setListener((_, e) => {
switch (e.data.name) { switch (e.data.name) {
case 'card-appear': case 'card-appear':
AudioManager.playSfx(this.sounds[0]);
this._activeCards.forEach((card) => { this._activeCards.forEach((card) => {
card.setActive(true); card.setActive(true);
}); });
break; break;
case 'card-claimed': case 'card-claimed':
AudioManager.playSfx(this.sounds[1]);
const cardRemove = this._activeCards.shift(); const cardRemove = this._activeCards.shift();
this._reward = cardRemove; this._reward = cardRemove;
this.animationHandler.removeSocket(cardRemove.socket); this.animationHandler.removeSocket(cardRemove.socket);
@ -67,6 +72,7 @@ export default class LuckyChain extends GachaBase {
this._allCards.push(cardRemove); this._allCards.push(cardRemove);
break; break;
case 'new-card-spawned': case 'new-card-spawned':
AudioManager.playSfx(this.sounds[2]);
const card = this._allCards.shift(); const card = this._allCards.shift();
const path = this.cardSlotPath[this.cardSlotPath.length - 1]; const path = this.cardSlotPath[this.cardSlotPath.length - 1];
const socket = this.animationHandler.addSocket(path, card.node); const socket = this.animationHandler.addSocket(path, card.node);

View File

@ -274,7 +274,7 @@ class GizmosDebugDraw extends Component {
const color = this._color.clone(); const color = this._color.clone();
const p = this._useLocalPosition ? this.worldToLocal(position) : position; const p = this._useLocalPosition ? this.worldToLocal(position) : position;
const transform = this.rotate(p, rot); const transform = this.rotate(p, rot);
let box = geometry?.AABB.create(p.x, p.y, p.z, size.x, size.y, size.z); let box = geometry?.AABB.create(p.x, p.y, p.z, size.x / 2, size.y / 2, size.z / 2);
this._renderer?.addBoundingBox(box, color, wireFrame, this._depthTest, false, true, transform); this._renderer?.addBoundingBox(box, color, wireFrame, this._depthTest, false, true, transform);
} }

View File

@ -2,7 +2,7 @@
"ver": "1.0.0", "ver": "1.0.0",
"importer": "audio-clip", "importer": "audio-clip",
"imported": true, "imported": true,
"uuid": "4fa2b9e5-1ded-4a31-8a39-7a87a7fce810", "uuid": "d09c6ddf-cddb-4c36-b4ae-e106ecf4743f",
"files": [ "files": [
".json", ".json",
".mp3" ".mp3"

Binary file not shown.

View File

@ -2,7 +2,7 @@
"ver": "1.0.0", "ver": "1.0.0",
"importer": "audio-clip", "importer": "audio-clip",
"imported": true, "imported": true,
"uuid": "991a1a79-af50-4266-8338-fbfba71e8a43", "uuid": "d8a8da5c-fb75-46a2-8ac1-ce00b40fc695",
"files": [ "files": [
".json", ".json",
".mp3" ".mp3"

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "120fc044-d116-4636-9498-608e244d5015",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "8c6929be-5d11-49a6-887f-60cccdd60999",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "9029c1e0-32c0-493b-8d57-c0faf64c3f04",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "5c776ed4-dc9d-4606-8b08-e5afc8b1a1ec",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "5fc9d817-c8bc-460a-8de4-08d23ae0bbd5",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "0f71123d-e160-42af-92ca-05be1751dccc",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "f5e98c1a-b637-4c08-96dd-7de6e635dc62",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "b3465c8c-e2fa-4729-843e-b6971d9992aa",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "ca7dc97e-d8a6-43f4-922d-14a2b5422cd6",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "b8b7fa90-6043-4754-8905-4c925f86124c",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "89ed611c-6a3e-4bb9-8901-74f3c1404a6d",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "fcc434e0-f727-44ab-94a4-2b1274c08f99",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "7b8c7e6e-9d0f-45ec-8cc2-adb6b67c9617",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "9f334c3f-fe75-466f-9a4f-1a3570d46a88",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "a123632f-6ffe-48ae-a544-5c8fab7a137c",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "0caae6b9-2151-4f71-a7b7-84729af7f8e7",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "89d3a1c8-ec9c-4ec2-b593-c675efc795c9",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"ver": "1.0.0",
"importer": "audio-clip",
"imported": true,
"uuid": "22f51dba-6b7d-4b07-a79f-6157a5a0536a",
"files": [
".json",
".mp3"
],
"subMetas": {},
"userData": {
"downloadMode": 0
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 KiB

After

Width:  |  Height:  |  Size: 573 KiB