Beispiel #1
0
    void Start()
    {
        _tlc = Ship.GetComponent <TimelineController>();
        float music;

        if (StorageeHelper.MusicVolume.TryGetValue(out music))
        {
            Mixer.SetFloat("music", SoundHelper.PercentToDecible(music));
        }
        float effects;

        if (StorageeHelper.EffectsVolume.TryGetValue(out effects))
        {
            Mixer.SetFloat("effects", SoundHelper.PercentToDecible(music));
        }
    }
Beispiel #2
0
 public void EffectsChange(float value)
 {
     Mixer.SetFloat("effects", SoundHelper.PercentToDecible(value));
     StorageeHelper.EffectsVolume.Value = value;
 }
Beispiel #3
0
 public void MusicChange(float value)
 {
     Mixer.SetFloat("music", SoundHelper.PercentToDecible(value));
     StorageeHelper.MusicVolume.Value = value;
 }