private void OnTriggerEnter2D(Collider2D collision) { // подготавливаем новый диалог FindObjectOfType <DialogTrigger>().SetReference(this); btnText.text = localizationSystem.GetKey("startdialog") + '\n' + localizationSystem.GetKey(dialog.keyName); dialogAnimator.SetBool("isActive", true); }
void Start() { text = GetComponent <TextMeshProUGUI>(); lang = FindObjectOfType <LocalizationSystem>(); lang.UpdateDict(); text.text = lang.GetKey(key); }
public void UpdateText() { Start(); text.text = lang.GetKey(key); }