Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Checks to see if a given key is pressed, and if it is, change to the given state and also increase the steps counter.
- /// </summary>
- /// <param name="key">Key. (KeyCode.whateverkey</param>
- /// <param name="newState">New state. (States.newstate)</param>
- void Consider_state (KeyCode key, States newState)
- {
- if (Input.GetKeyDown (key)) {
- myState = newState;
- steps++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement