Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /// <summary>
  2.     /// Checks to see if a given key is pressed, and if it is, change to the given state and also increase the steps counter.
  3.     /// </summary>
  4.     /// <param name="key">Key. (KeyCode.whateverkey</param>
  5.     /// <param name="newState">New state. (States.newstate)</param>
  6.     void Consider_state (KeyCode key, States newState)
  7.     {
  8.         if (Input.GetKeyDown (key)) {
  9.             myState = newState;
  10.             steps++;
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement