Guest User

Untitled

a guest
Feb 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. // First Hall Method
  2. public int index = 0;
  3. public List<string> texts = new List<string>() { "text1", "text2", "text3" };
  4. void state_hall_1()
  5. {
  6. currentText.text = texts[index];
  7. if (Input.GetKeyDown(KeyCode.Space))
  8. {
  9. if (index != texts.Count)
  10. {
  11. index+=1;
  12. currentText.text = texts[index];
  13. }
  14.  
  15. }
  16. if(index >= texts.Count){
  17. if (Input.GetKeyDown(KeyCode.C))
  18. {
  19. currentState = States.c_1;
  20. }
  21. }
  22. }
Add Comment
Please, Sign In to add comment