KeepItUp/Assets/_Scripts/Managers/UIManager.cs
2022-03-23 19:43:11 +02:00

20 lines
647 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class UIManager : MonoBehaviour
{
[Header("Score UI")]
[SerializeField] private TextMeshProUGUI _scoreText;
[SerializeField] private Slider _experienceSlider;
[SerializeField] private TextMeshProUGUI _multiplierText;
public void SetScoreText(int value) => _scoreText.text = value.ToString();
public void SetExperienceSliderValue(int value) => _experienceSlider.value = value;
public void SetExperienceSliderMaxValue(int value) => _experienceSlider.maxValue = value;
public void SetMultiplierText(int value) => _multiplierText.text = $"×{value}";
}