SHOW:
|
|
- or go back to the newest paste.
1 | switch(state) | |
2 | { | |
3 | case InputStates.notWaiting: | |
4 | guiText.text = "Time until next turn: " + TimerLength.ToString("F0"); | |
5 | break; | |
6 | case InputStates.waitingForLane: | |
7 | guiText.text = "Make your move\nPress \'1\' for Left Lane\nPress \'2\' for Middle Lane\nPress \'3\' for Right Lane"; | |
8 | if (Input.GetKeyDown("1")) | |
9 | { | |
10 | selectedLane = Lanes.leftLane; | |
11 | laneName = "Left Lane"; | |
12 | - | state = InputStates.waitingForClass; |
12 | + | goto case InputStates.waitingForClass; |
13 | } | |
14 | else if (Input.GetKeyDown("2")) | |
15 | { | |
16 | selectedLane = Lanes.middleLane; | |
17 | laneName = "Middle Lane"; | |
18 | - | state = InputStates.waitingForClass; |
18 | + | goto case InputStates.waitingForClass; |
19 | } | |
20 | else if (Input.GetKeyDown("3")) | |
21 | { | |
22 | selectedLane = Lanes.rightLane; | |
23 | laneName = "Right Lane"; | |
24 | - | state = InputStates.waitingForClass; |
24 | + | goto case InputStates.waitingForClass; |
25 | } | |
26 | break; | |
27 | case InputStates.waitingForClass: | |
28 | guiText.text = "Make your move\n" + laneName + " selected\nPress \'g\' for Gatherer\nPress \'w\' for Warrior\nPress \'t\' for Thief"; | |
29 | if (Input.GetKeyDown("g")) | |
30 | { | |
31 | //spawn gatherer | |
32 | selectedCharacter = Characters.gatherer; | |
33 | - | state = InputStates.notWaiting; |
33 | + | goto case InputStates.notWaiting; |
34 | } | |
35 | else if (Input.GetKeyDown("w")) | |
36 | { | |
37 | //spawn warrior | |
38 | selectedCharacter = Characters.warrior; | |
39 | - | state = InputStates.notWaiting; |
39 | + | goto case InputStates.notWaiting; |
40 | } | |
41 | else if (Input.GetKeyDown("t")) | |
42 | { | |
43 | //spawn thief | |
44 | selectedCharacter = Characters.thief; | |
45 | - | state = InputStates.notWaiting; |
45 | + | goto case InputStates.notWaiting; |
46 | } | |
47 | break; | |
48 | } |