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

public class FreezeButton : MonoBehaviour {

    public GameObject window;

    public AudioClip activationAudio;

    public void OnClick()
    {
        GameObject.FindGameObjectWithTag("GameController").GetComponent<GlobalManager>().Freeze(2);

        GameObject.FindGameObjectWithTag("GameController").GetComponent<AudioManager>().Play(activationAudio, Vector3.zero);

        GameObject.Destroy(window);
    }
}
