You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
28 lines
716 B
C#
28 lines
716 B
C#
using Demonics.UI;
|
|
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
|
|
public class OptionsMenu : BaseMenu
|
|
{
|
|
[SerializeField] private AudioMixer _audioMixer = default;
|
|
|
|
|
|
public void SetVFX(int value)
|
|
{
|
|
float parsedValue = ((float)value / 10) + 0.00001f;
|
|
_audioMixer.SetFloat("VFXVolume", Mathf.Log10(parsedValue) * 20);
|
|
}
|
|
|
|
public void SetUI(int value)
|
|
{
|
|
float parsedValue = ((float)value / 10) + 0.00001f;
|
|
_audioMixer.SetFloat("UIVolume", Mathf.Log10(parsedValue) * 20);
|
|
}
|
|
|
|
public void SetMusic(int value)
|
|
{
|
|
float parsedValue = ((float)value / 10) + 0.00001f;
|
|
_audioMixer.SetFloat("MusicVolume", Mathf.Log10(parsedValue) * 20);
|
|
}
|
|
}
|