FMOD功能迁移
This commit is contained in:
@@ -22,26 +22,7 @@ public class MessageBox : MonoBehaviour
|
||||
//DontDestroyOnLoad(gameObject); // 可选:保持在场景加载之间
|
||||
}
|
||||
}
|
||||
// Yarn Command处理方法
|
||||
// [YarnCommand("messagebox")]
|
||||
// public void HandleMessageBoxCommand(string type, string message)
|
||||
// {
|
||||
// switch (type.ToLower())
|
||||
// {
|
||||
// case "warning":
|
||||
// SetWarning(message);
|
||||
// break;
|
||||
// case "normal":
|
||||
// SetNormal(message);
|
||||
// break;
|
||||
// case "null":
|
||||
// SetNull();
|
||||
// break;
|
||||
// default:
|
||||
// Debug.LogError("Invalid message type for messagebox command: " + type);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SetNull();
|
||||
@@ -76,21 +57,4 @@ public class MessageBox : MonoBehaviour
|
||||
text.color = Color.white; // 默认文本颜色
|
||||
//StopCoroutine(FlashWarning()); // 停止闪烁效果(如果正在闪烁)
|
||||
}
|
||||
|
||||
// 闪烁警告效果
|
||||
private IEnumerator FlashWarning()
|
||||
{
|
||||
AudioManager.SetinteractionSourceVolume(0.35f);
|
||||
AudioManager.RandomPlayInteraction("beep_warning");
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
state.enabled = false;
|
||||
yield return new WaitForSeconds(0.3f); // 闪烁间隔
|
||||
state.enabled = true;
|
||||
yield return new WaitForSeconds(0.3f); // 闪烁间隔
|
||||
}
|
||||
AudioManager.SetinteractionSourceVolume(1f);
|
||||
state.enabled = true; // 确保闪烁后状态仍然可见
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user