This commit is contained in:
2026-06-04 10:42:23 +07:00
parent e7e90790c9
commit 9be2242378
4166 changed files with 53005 additions and 11401 deletions

View File

@@ -0,0 +1,42 @@
using UnityEngine;
using UnityEngine.UI;
namespace Invector
{
public class vTutorialTextTrigger : MonoBehaviour
{
[TextAreaAttribute(5, 3000), Multiline]
public string text;
public Text _textUI;
public GameObject painel;
protected virtual void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
EnableTutorialPanel();
}
}
public virtual void EnableTutorialPanel()
{
painel.SetActive(true);
_textUI.gameObject.SetActive(true);
_textUI.text = text;
}
protected virtual void OnTriggerExit(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
DisableTutorialPanel();
}
}
public virtual void DisableTutorialPanel()
{
painel.SetActive(false);
_textUI.gameObject.SetActive(false);
_textUI.text = " ";
}
}
}