A hard work in a little process.
public class AdventureGame : MonoBehaviour
{
[SerializeField] Text textComponent;
[SerializeField] State startingState;
State acaoAtual;
// Start is called before the first frame update
void Start()
{
acaoAtual = startingState;
//textComponent.text = "Isto é um teste.";
textComponent.text = acaoAtual.GetStateStory();
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Keypad1))
{
textComponent.text = acaoAtual.GetStateStory();
}
}
}