ClientServer/Client/Assets/Scripts/UI/OpenInventoryKeyChanger.cs
TG9six 03a642d635 first push
first push
2025-09-06 17:17:39 +04:00

31 lines
686 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class OpenInventoryKeyChanger : MonoBehaviour
{
private TMP_Text thisText;
private string textToShow;
void Awake()
{
thisText = GetComponent<TextMeshProUGUI>();
}
// Update is called once per frame
void Update()
{
if (UIManager.Instance.Inventory.activeInHierarchy)
{
thisText.text = "[[Inventory]]";
}
else
{
thisText.text = "[[Inventory]]";
}
textToShow = thisText.text;
thisText.text = InputMessageHandler.Instance.Interpolate($"{textToShow}");
}
}