Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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;
- }
- }
- }
Add Comment
Please, Sign In to add comment