SHARE
TWEET

Untitled

a guest Feb 20th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. left, right, up, down = False, False, False, False
  2.  
  3. def keyPressed():
  4.     global left, right, up, down
  5.     left = True if keyCode == LEFT else left
  6.     right = True if keyCode == RIGHT else right
  7.     up = True if keyCode == UP else up
  8.     down = True if keyCode == DOWN else down
  9.    
  10. def keyReleased():
  11.     global left, right, up, down
  12.     left = False if keyCode == LEFT else left
  13.     right = False if keyCode == RIGHT else right
  14.     up = False if keyCode == UP else up
  15.     down = False if keyCode == DOWN else down
  16.  
  17. #---------------------------
  18.  
  19. def setup():
  20.     pass
  21.    
  22. def draw():
  23.     pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top