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

public class UIManager : MonoBehaviour
{
    [SerializeField]
    Earthquake p_myEarthquake;
    [SerializeField]
    AudioSource p_myAudioSource;

	void Start ()
    {
		
	}

	void Update ()
    {

    }

    public void ButtonPressed(string ButtonName)
    {
        Sound();
        switch (ButtonName)
        {
            case "Earthquake":
                ControllerManager.instance.setPower(p_myEarthquake);
                break;
        }
    }

    void Sound()
    {
        if (!p_myAudioSource.isPlaying)
        {
            p_myAudioSource.Play();
        }
    }
}