添加音效

This commit is contained in:
2025-06-18 17:08:32 +08:00
parent 938b420197
commit 3478026944
6 changed files with 2120 additions and 2019 deletions
@@ -4,6 +4,7 @@ using Newtonsoft.Json;
using UnityEngine;
using System.Collections;
using DG.Tweening;
using AibisDream.Kit;
namespace AibisDream.FixSystem
{
@@ -218,6 +219,16 @@ namespace AibisDream.FixSystem
bool shouldShow = UnityEngine.Random.value > 0.5f;
SetCutTextVisible(shouldShow);
// 播放相应的音效
if (shouldShow)
{
AudioManager.Instance.PlaySfx("event:/ActionFB/light_flicker_on");
}
else
{
AudioManager.Instance.PlaySfx("event:/ActionFB/light_flicker_off");
}
// 随机等待时间,模拟接触不良效果
float waitTime = UnityEngine.Random.Range(cutTextFlickerInterval * 0.5f, cutTextFlickerInterval * 1.5f);
yield return new WaitForSeconds(waitTime);