Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created February 8, 2018 23:26
Show Gist options
  • Save paulohenriquesn/460555e974b7b45127f0e93acf68f6b1 to your computer and use it in GitHub Desktop.
Save paulohenriquesn/460555e974b7b45127f0e93acf68f6b1 to your computer and use it in GitHub Desktop.
// First Hall Method
public int index = 0;
public List<string> texts = new List<string>() { "text1", "text2", "text3" };
void state_hall_1()
{
if(index++ != texts.Count){
index+=1;
}
currentText.text = texts[index];
if (Input.GetKeyDown(KeyCode.Space))
{
if (index < texts.Count)
{
currentText.text = texts[index];
}
}
if(index >= texts.Count){
if (Input.GetKeyDown(KeyCode.C))
{
currentState = States.c_1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment