Advertisement
LittleAngel

enum - case

Mar 12th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public enum GameState {Paused, Playing}
  2.  
  3. if(hit.transform.name == "pause") {
  4. switch (GameState) {
  5. case Playing:
  6. Pause();
  7. break;
  8. case Paused:
  9. Unpause();
  10. break;
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement