Guest User

Untitled

a guest
Mar 24th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import pyxel
  2.  
  3. WIDTH = 100
  4. HEIGHT = 100
  5. FPS = 60
  6.  
  7. class Test:
  8.  
  9.  
  10. def __init__(self):
  11. pyxel.init(WIDTH, HEIGHT, caption = 'test!', fps = FPS)
  12. pyxel.run(self.update, self.draw)
  13.  
  14. def update(self):
  15. if pyxel.btnp(pyxel.KEY_Q):
  16. pyxel.quit()
  17.  
  18. def draw(self):
  19. pyxel.cls(1)
  20. pyxel.rectb(10, 1, 1, 10, 11)
  21.  
  22. def sayHi(self):
  23. if pyxel.btn(pyxel.KEY_RIGHT) == True:
  24. print("hi")
  25.  
  26. Test()
Advertisement
Add Comment
Please, Sign In to add comment