添加音效
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user