﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class ExitGame : MonoBehaviour {

    public Button button;

    // Use this for initialization
    void Start()
    {
        //Associa o botão recebido e faz com que o clique chame o QuitGame()
        Button btn = button.GetComponent<Button>();
        btn.onClick.AddListener(QuitGame);
    }

    // Update is called once per frame
    void QuitGame()
    {
        Application.Quit();
    }
}
