chip-gameV3/Assets/Scripts/Menu/ContactsLabel.cs
sega 8a6d23b77d Реорг Scripts
Разделено на 4 модуля
- Menu
- Gameplay
- Settings
- Common
2026-07-15 10:49:55 +03:00

31 lines
759 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;
public class ContactsLabel : MonoBehaviour
{
public string startText = "администрация: ";
TextMeshProUGUI label;
private void OnEnable()
{
label = GetComponent<TextMeshProUGUI>();
SettingsManager.OnSettingsChanged.AddListener(pullSettings);
InvokeRepeating("pullSettings", 0, 10);
}
void pullSettings()
{
string contact;
if (PlayerPrefs.HasKey("NumberTech"))
{
contact = PlayerPrefs.GetString("NumberTech");
}
else contact = "<Не указано>";
if (SettingsManager.GetBool("ShowNumber", true))
label.text = startText + contact;
else
label.text = "";
}
}