31 lines
686 B
C#
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}");
|
|
}
|
|
}
|