feat: add UI manager

This commit is contained in:
cuqmbr 2022-03-23 19:43:11 +02:00
parent bf938e5307
commit b9e1ca9841
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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}";
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 51461a5e829c16567902ce08ad663025
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: