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

public class UIManager : MonoBehaviour {
    public Text currentPlayerHitText;
    public Text currentEnemyHitText;
    public Text currentMoneyText;
    public Text currentLevelText;
    public GameObject panel;
    public GameManager gm;
    public List<Button> buttons;
    public GameObject credits;

    public void setCurrentPlayerHitText(int amt)
    {
        currentPlayerHitText.text = "You: " + amt.ToString();
    }

    public void setCurrentEnemyHitText(int amt)
    {
        currentEnemyHitText.text = "Enemy: " + amt.ToString();
    }

    public void setCurrentMoneyText(int amt)
    {
        currentMoneyText.text = "$" + amt.ToString();
    }

    public void setLevelText()
    {
        currentLevelText.text = "Level: " + gm.currentLevel.ToString();
    }

    public void closeStore()
    {
        panel.SetActive(false);
        gm.StartGameplay();
    }

    public bool toggleCredits(bool active)
    {
        if (active)
        {
            credits.gameObject.SetActive(false);
            return false;
        }

        credits.gameObject.SetActive(true);
        return true;
    }
}
