Guest User

Untitled

a guest
Feb 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 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. if(index++ != texts.Count){
  7. index+=1;
  8. }
  9. currentText.text = texts[index];
  10. if (Input.GetKeyDown(KeyCode.Space))
  11. {
  12. if (index < texts.Count)
  13. {
  14. currentText.text = texts[index];
  15. }
  16.  
  17. }
  18. if(index >= texts.Count){
  19. if (Input.GetKeyDown(KeyCode.C))
  20. {
  21. currentState = States.c_1;
  22. }
  23. }
  24. }
Add Comment
Please, Sign In to add comment