Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created February 8, 2018 23:29
Show Gist options
  • Save paulohenriquesn/f3ee7c4cc9ef8e1d04408ee6f5086c93 to your computer and use it in GitHub Desktop.
Save paulohenriquesn/f3ee7c4cc9ef8e1d04408ee6f5086c93 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()
{
currentText.text = texts[index];
if (Input.GetKeyDown(KeyCode.Space))
{
if (index != texts.Count)
{
index+=1;
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