feat: add UI manager
This commit is contained in:
parent
bf938e5307
commit
b9e1ca9841
19
Assets/_Scripts/Managers/UIManager.cs
Normal file
19
Assets/_Scripts/Managers/UIManager.cs
Normal 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}";
|
||||
}
|
11
Assets/_Scripts/Managers/UIManager.cs.meta
generated
Normal file
11
Assets/_Scripts/Managers/UIManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51461a5e829c16567902ce08ad663025
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user