26 lines
721 B
C#
26 lines
721 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
|
|
[RequireComponent(typeof(TextMeshProUGUI), typeof(CanvasGroup))]
|
|
public class NumberTechSupport : MonoBehaviour
|
|
{
|
|
private CanvasGroup _canvasGroup;
|
|
private TextMeshProUGUI _label;
|
|
|
|
void Start()
|
|
{
|
|
_canvasGroup = GetComponent<CanvasGroup>();
|
|
_label = GetComponent<TextMeshProUGUI>();
|
|
|
|
UpdateView();
|
|
SettingsManager.OnSettingsChanged += UpdateView;
|
|
}
|
|
|
|
private void UpdateView()
|
|
{
|
|
_canvasGroup.alpha = SettingsManager.GetBool(SettingKey.SHOW_NUMBERTECH) ? 1 : 0;
|
|
string number = PlayerPrefs.GetString("NumberTech", "<не указан>");
|
|
_label.text = $"тех. поддержка: {number}";
|
|
}
|
|
}
|