using UnityEngine;
using UnityEngine.UI;
//using UnityEngine.SceneManagement;
using System.Collections;

public class OptionButtons : MonoBehaviour 
{

	public bool muted = false;

	static OptionButtons _instance;

	static public OptionButtons instance 
	{
		// using lazy instantiation here... 
		get
		{
			return _instance;
		}
	}

	void Awake()
	{
		_instance = this;
	}
	
	public void OnMuteButtonClicked()
	{
	
		if(!muted)
		{
			MusicController.instance.Mute();
			SfxController.instance.MuteAll();
			muted = true;
		}
		else
		{
			MusicController.instance.Unmute();
			SfxController.instance.UnmuteAll();
			muted = false;
		}
	}

	public void OnBackToMenuClicked()
	{
		Application.LoadLevel("MainMenu");
	}
}
