using UnityEngine;
using System.Collections;

public class MainMenuHandler : MonoBehaviour {

	public GameObject mainGame;
	public UITexture credits;
	public AudioSource mainAudio;
	public AudioClip mainClip;


	bool isCredits=false;

	void OnEnable(){
		mainAudio.clip=mainClip;
		mainAudio.loop=true;
		mainAudio.Play();
	}

	public void StartGameButton(){
		isCredits=false;
		credits.enabled=false;
		mainGame.SetActive(true);
		gameObject.SetActive(false);
	}

	public void CreditsButton(){
		isCredits=!isCredits;
		credits.enabled=isCredits;
	}
	

}
