using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;

public class MainMenu : MonoBehaviour
{
	public AudioMixer Mixer;
	public List<AudioMixerSnapshot> Snapshots;
	public GameObject MenuObject;
	public GameObject SettingsObject;
	[Space]
	[Header("Camera Variables")]
	public Transform CameraPosStart;
	public float CameraPlaySpeed;

	public void Play()
	{
		iTween.MoveTo(Camera.main.gameObject, CameraPosStart.position, CameraPlaySpeed);
		iTween.RotateTo(Camera.main.gameObject, CameraPosStart.eulerAngles, CameraPlaySpeed);
		MenuObject.SetActive(false);
		Snapshots.Find(x => x.name == "ComputerSnapshot").TransitionTo(.5f);
	}

	public void Settings()
	{
		SettingsObject.SetActive(true);
	}

	public void Exit()
	{
		Application.Quit();
	}

	public void SetBGMVolume(float vol)
	{
		Mixer.SetFloat("BGMVolume", vol);
	}

	public void SetSFXVolume(float vol)
	{
		Mixer.SetFloat("SFXVolume", vol);
	}

	public void SetMasterVolume(float vol)
	{
		Mixer.SetFloat("MasterVolume", vol);
	}

	public void SetFullscreen(bool val)
	{
		Screen.fullScreen = val;
	}
}
