kisame1313

AudioOptions

Sep 26th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4.  
  5. public class AudioOptions : MonoBehaviour
  6. {
  7.     public AudioSource musicSource, soundSource;
  8.     public Slider musicSlider, soundSlider;
  9.  
  10.     public void MusicVolume()
  11.     {
  12.         musicSource.volume = musicSlider.value;
  13.     }
  14.  
  15.     public void SoundVolume()
  16.     {
  17.         soundSource.volume = soundSlider.value;
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment