音效修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 38s

This commit is contained in:
TJH 2025-10-09 11:38:04 +08:00
parent 4124b6821f
commit 10931663d7
4 changed files with 86 additions and 78 deletions

View File

@ -2294,7 +2294,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "79PopI+4lO9Kr9FNVJc4ay"
"fileId": "72N1vXJxJE8pP9MNVSBJe4"
},
{
"__type__": "cc.PrefabInfo",
@ -2304,7 +2304,7 @@
"asset": {
"__id__": 0
},
"fileId": "76gCtN1vNB/L4CGevapKEo",
"fileId": "7b+XSLbkhM8Lt+0jConpeg",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -2335,7 +2335,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "54Kl3Ic6VDSav3/ePeWlCY"
"fileId": "1aF3X/luFLa775hH4gev+Y"
},
{
"__type__": "cc.PrefabInfo",
@ -2345,7 +2345,7 @@
"asset": {
"__id__": 0
},
"fileId": "130cOjseBBto/UckGS6wkL",
"fileId": "d8B1CnDiNOUKb4twYhHAGO",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -2376,7 +2376,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d8bnE5XIdKYYB2nnB71Yn3"
"fileId": "b03uUyrbhBXbf984/QMz9P"
},
{
"__type__": "5fc10Zl7lVO97/rr2J1uxWH",
@ -2400,7 +2400,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "84BN6q4qxJnKGOm2BxObzB"
"fileId": "eaU3ux11xIA6mTaJAA7ifi"
},
{
"__type__": "5fd13+Xa69CZogb3Q/F1lnC",
@ -2573,7 +2573,7 @@
"asset": {
"__id__": 0
},
"fileId": "e9i4wzUUBBcb+R4mU0I8QY",
"fileId": "baxHIDn5BEZZaPHZKBXpWD",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -2598,7 +2598,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "caNFgB1L1NUYEE3qsh3sR5"
"fileId": "75r5Ymn61A7alz7a05frbI"
},
{
"__type__": "cc.UITransform",
@ -2626,7 +2626,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d8HZFRtFpObIV+FPQMDR6d"
"fileId": "0dT9tWnVxFtK/JRMpm6XIY"
},
{
"__type__": "cc.Sprite",
@ -2671,7 +2671,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "394nL4Xc1KlYcyB6aM8jex"
"fileId": "7dp2IIrZNOg5S4vvUzr92v"
},
{
"__type__": "cc.PrefabInfo",
@ -2681,7 +2681,7 @@
"asset": {
"__id__": 0
},
"fileId": "3drNqHUUhLPIurT9ov6jhU",
"fileId": "66Vy3DfmFAdryPZKigxSXm",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -2936,7 +2936,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c8lvtWgoRNNKu6l8AkQw7v"
"fileId": "61zPeKW+lM2bgZNzQk6LQx"
},
{
"__type__": "cc.PrefabInfo",
@ -2946,7 +2946,7 @@
"asset": {
"__id__": 0
},
"fileId": "85V6eOgRZMwaL50NcHWX3A",
"fileId": "27chq6Qh1AzYuFZagEtR1n",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -2977,7 +2977,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ee3icsZ7tJVL/wlkqpF+gC"
"fileId": "723UEjWGJF9YRtguBhZFdV"
},
{
"__type__": "cc.PrefabInfo",
@ -2987,7 +2987,7 @@
"asset": {
"__id__": 0
},
"fileId": "f5PEjPUXVCy7uUoGa13khl",
"fileId": "57+vM/h7hEF5CPpgvo8sou",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3018,7 +3018,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b7W0cfgaxIx4E9i8wa3SUt"
"fileId": "4dyohya21A3rBQgnztHHs+"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -3042,7 +3042,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e5PqR3xlhOyJY3NEr/Ewi5"
"fileId": "55fH6tK2xJ27EpFZqn1QEh"
},
{
"__type__": "cc.PrefabInfo",
@ -3052,7 +3052,7 @@
"asset": {
"__id__": 0
},
"fileId": "decNQlsRBHKrMWFTcfoigP",
"fileId": "0c6Gikz05FML8bqk+18VB+",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3235,7 +3235,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e6VewFL7JJqbWWb5hhKDOx"
"fileId": "72U71gNlBOX5felCTEBz9d"
},
{
"__type__": "cc.PrefabInfo",
@ -3245,7 +3245,7 @@
"asset": {
"__id__": 0
},
"fileId": "9aaTVH/iNOqop5w9UrYtOs",
"fileId": "8d9km7t4pCIIYYPKDdMHrI",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3276,7 +3276,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f0m7RJq3lLDLWFII2gouTH"
"fileId": "48s3VvBx1Oq54/SQbRSFG8"
},
{
"__type__": "cc.PrefabInfo",
@ -3286,7 +3286,7 @@
"asset": {
"__id__": 0
},
"fileId": "3aYpQgm5xIWaPLepF+beZM",
"fileId": "b3OlUuN+9PgZoX+4qKv+Xa",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3317,7 +3317,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "79eNZSaSBJUaEZdqXN1tov"
"fileId": "33X/PGWXpBPJl/qbXcL6C1"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -3341,7 +3341,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "28ZIpQTEhBv7MLiAp73ctG"
"fileId": "dfPN4WM7lFr6STWOMjjhEG"
},
{
"__type__": "cc.PrefabInfo",
@ -3351,7 +3351,7 @@
"asset": {
"__id__": 0
},
"fileId": "13KFvEhiVKyoQmOXIKRq/N",
"fileId": "64z9n1gFxI1rJP3OfDMvEv",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3534,7 +3534,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "012yQz8BBElZkQ4L/hMDot"
"fileId": "7fokJ8y2pCcaBALZPoejQr"
},
{
"__type__": "cc.PrefabInfo",
@ -3544,7 +3544,7 @@
"asset": {
"__id__": 0
},
"fileId": "4989l0jtdC3bvv4Q49Ymzs",
"fileId": "bdDTo5ObhAhKRNGkKkt7tI",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3575,7 +3575,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e8y9cw98JDYI6pFqfsUEO/"
"fileId": "65f/H5diFHFJxx9NMtlUoY"
},
{
"__type__": "cc.PrefabInfo",
@ -3585,7 +3585,7 @@
"asset": {
"__id__": 0
},
"fileId": "21VswnaBRBz547l94eptQT",
"fileId": "f7ADe+XodLupnLYZexCIfE",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3616,7 +3616,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e17izhFjlPgIR5m62m5Z8y"
"fileId": "59pp/kv0VEGIryz/IR7Xkd"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -3640,7 +3640,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ffJo799zlA5pUAl0K5B2TG"
"fileId": "4dM9tS4i9DZYjsKP5F2Z4C"
},
{
"__type__": "cc.PrefabInfo",
@ -3650,7 +3650,7 @@
"asset": {
"__id__": 0
},
"fileId": "f1cYbVbPJCo7/BxvHj4ilt",
"fileId": "95eBPmx5NAdrrwLHHlQ3Nx",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3833,7 +3833,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "692zaAdEdARadTPn0FAOPs"
"fileId": "b9JONKskpK67JyrZVFUS/v"
},
{
"__type__": "cc.PrefabInfo",
@ -3843,7 +3843,7 @@
"asset": {
"__id__": 0
},
"fileId": "0fx33ngWpOn5cvZH74jO2Z",
"fileId": "a5d0p4o5pJdoiSzn8R6UeA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3874,7 +3874,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "475PVnse5FC7xXiJG4BCji"
"fileId": "99xOGBcwBD2adUoe4+PUQ/"
},
{
"__type__": "cc.PrefabInfo",
@ -3884,7 +3884,7 @@
"asset": {
"__id__": 0
},
"fileId": "31KQJYhyhAapLhKEvoOUnq",
"fileId": "89M43N8HJN6rSNJYb1u15M",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -3915,7 +3915,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "12I2zInDdPopKDHU/p2RUa"
"fileId": "b4ugmSNjlIiIGjdMB2ORLE"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -3939,7 +3939,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e8zes+D/lEkbwTAJ9t6L+W"
"fileId": "a8QbCyAGlKDoUS8Z1du80z"
},
{
"__type__": "cc.PrefabInfo",
@ -3949,7 +3949,7 @@
"asset": {
"__id__": 0
},
"fileId": "22Oa97YPtI9I2yGd88iII6",
"fileId": "a20T1Z/x1Nk7cEkio52LIH",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4132,7 +4132,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6b5kDv26RP3qjNZOYN0S8Z"
"fileId": "1fZiwh7txJ16PnbKd3BZXn"
},
{
"__type__": "cc.PrefabInfo",
@ -4142,7 +4142,7 @@
"asset": {
"__id__": 0
},
"fileId": "fe46ykr/dOCZltbqubg3Ry",
"fileId": "d7PR7L9flJKYzlVHh6QP3H",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4173,7 +4173,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2bmrpnHXpE85Cq67ze44n1"
"fileId": "334brQS/1HgorfBVVxMysv"
},
{
"__type__": "cc.PrefabInfo",
@ -4183,7 +4183,7 @@
"asset": {
"__id__": 0
},
"fileId": "09+iV68oBO4KSelHbzTD4Q",
"fileId": "aaWGr0Vo9DMoSNGGR4WFXa",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4214,7 +4214,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d85kmBM+RNh5+vv9sRS417"
"fileId": "7d/uzWc0BFVYMV3ylZBsGk"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -4238,7 +4238,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "05A8Tb1mZGg6olotc2AUZl"
"fileId": "91Ay3WMX5MIqdzVX2LDKYN"
},
{
"__type__": "cc.PrefabInfo",
@ -4248,7 +4248,7 @@
"asset": {
"__id__": 0
},
"fileId": "6b7/sGjTZIo4eSjAyYK4yJ",
"fileId": "29HKwdS8xEQZpO54DeSCXX",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4431,7 +4431,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3dvVoc22hGHbtV7JNJHcFS"
"fileId": "7fbYSTNjVEy7ghh0fBvBaf"
},
{
"__type__": "cc.PrefabInfo",
@ -4441,7 +4441,7 @@
"asset": {
"__id__": 0
},
"fileId": "bfJGBkeHxCWpLZofNz2QB6",
"fileId": "3e6HN/T2RFRqliRoX0Chpd",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4472,7 +4472,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "cbAiyfM0BNgInGKXbBX+Bz"
"fileId": "2aclR1kxZPFZZc0elxvJdd"
},
{
"__type__": "cc.PrefabInfo",
@ -4482,7 +4482,7 @@
"asset": {
"__id__": 0
},
"fileId": "ae4xKKgzRFBJ6kDoY2XV4l",
"fileId": "1coSK6rmNMppnxm9YR3Zjx",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4513,7 +4513,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f2VD4BU0hJEbcsIU/8W2y3"
"fileId": "e4QQK4B1NJ7bNC86ULxKIR"
},
{
"__type__": "45522uB1sdFu4FJAojtnha4",
@ -4537,7 +4537,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b4pCQKRmRJUoyN2YWSgeng"
"fileId": "f7W9j+rxdNlaZls1efBOEo"
},
{
"__type__": "cc.PrefabInfo",
@ -4547,7 +4547,7 @@
"asset": {
"__id__": 0
},
"fileId": "b4foY0oQlHNJn1SyCFO3kM",
"fileId": "04HGvWZ1ZNwL54UiuVfvKu",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -4572,7 +4572,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "64kvDrfzFG8oqbxpUp3s7s"
"fileId": "1cjc1YVqFOpKg218RM6UaV"
},
{
"__type__": "cc.UITransform",
@ -4600,7 +4600,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "065yIueIJKqZTGMImOxMII"
"fileId": "6bjTk5QWtNQJ7h7Hk01Npt"
},
{
"__type__": "cc.Sprite",
@ -4645,7 +4645,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "58Lx3stx5Mt7j72X5rxMKI"
"fileId": "a0/rxuPPdN2omxuIBtGxr0"
},
{
"__type__": "cc.PrefabInfo",
@ -4655,7 +4655,7 @@
"asset": {
"__id__": 0
},
"fileId": "86GnuYJdtOmLn1EuX/BBXz",
"fileId": "56VsWqp0hDvoBFe7kRfnGf",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
@ -9498,7 +9498,7 @@
"__uuid__": "ad4ecbb8-d2ae-410b-b204-aaed61bc63e6",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "",
"defaultSkin": "default",
"defaultAnimation": "",
"_premultipliedAlpha": false,
"_timeScale": 1,
@ -10094,7 +10094,7 @@
"__uuid__": "ad4ecbb8-d2ae-410b-b204-aaed61bc63e6",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "",
"defaultSkin": "default",
"defaultAnimation": "",
"_premultipliedAlpha": false,
"_timeScale": 1,
@ -10461,7 +10461,7 @@
"_lscale": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": 1,
"z": 1
},
"_mobility": 0,

View File

@ -708,7 +708,7 @@ export class SlotGame extends Component {
}
showReadyHand(rollerId?: number) {
async showReadyHand(rollerId?: number) {
if (this.rollerManager.getIsManualStop() || this.rollerManager.getIsFastSpin()) return;
this.readyHand.active = true;
this.showOneScatterAndCollectx2(true)
@ -728,7 +728,10 @@ export class SlotGame extends Component {
})
if (rollerId == 0 || rollerId) {
if (rollerId != -1) {
AudioManager.instance.playSFX('Appear_Scatter_Sound_Final');
await AudioManager.instance.stopAllSFX()
AudioManager.instance.playSFX('Appear_Scatter_Sound_Final', 1, true);
} else {
AudioManager.instance.stopAllSFX()
}
}
}

View File

@ -472,6 +472,7 @@ export class SlotScene extends Component {
if (isExpect) {
this.slotGame.playScatterAni(() => {
this.FreeSpinEnter.show(this.spinInfo.Data.FreeSpin.MaxCount, () => {
AudioManager.instance.stopAllSFX()
AudioManager.instance.playBGM('Free_Mode_BGM');
this.slotGame.changeBg(true);
this.slotBar.enterFreeSpin(this.spinInfo.Data.FreeSpin.LeftCount);

View File

@ -55,22 +55,22 @@ export class AudioManager {
}
playBGM(name: string, loop: boolean = true) {
if (this._isMuted || !this._bgmAudioSource) return;
this._bgmAudioSource.stop();
let clip = this._audioClips.get(name);
if (!clip) {
console.warn(`BGM ${name} 不存在`);
return;
}
this._bgmClip = clip;
this._bgmAudioSource.clip = clip;
this._bgmAudioSource.loop = loop;
this._bgmAudioSource.volume = this._bgmVolume;
this._bgmAudioSource.play();
this._isPaused = false;
// if (this._isMuted || !this._bgmAudioSource) return;
// this._bgmAudioSource.stop();
// let clip = this._audioClips.get(name);
// if (!clip) {
// console.warn(`BGM ${name} 不存在`);
// return;
// }
// this._bgmClip = clip;
// this._bgmAudioSource.clip = clip;
// this._bgmAudioSource.loop = loop;
// this._bgmAudioSource.volume = this._bgmVolume;
// this._bgmAudioSource.play();
// this._isPaused = false;
}
playSFX(name: string, volume: number = 1.0) {
playSFX(name: string, volume: number = 1.0, loop: boolean = false) {
if (this._isMuted) return;
let clip = this._audioClips.get(name);
@ -84,8 +84,10 @@ export class AudioManager {
if (availableSource) {
// 确保音量正确
availableSource.volume = volume;
availableSource.loop = loop;
availableSource.clip = clip;
// 播放新音效
availableSource.playOneShot(clip, volume);
availableSource.play()
} else {
// 如果没有空闲的AudioSource创建一个新的
let sfxNode = new Node(`SFX_${this._sfxAudioSources.length}`);
@ -93,8 +95,10 @@ export class AudioManager {
let newSource = sfxNode.addComponent(AudioSource);
newSource.playOnAwake = false;
newSource.volume = volume;
newSource.loop = loop;
newSource.clip = clip;
this._sfxAudioSources.push(newSource);
newSource.playOneShot(clip, volume);
newSource.play()
}
}