Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyxel
- WIDTH = 100
- HEIGHT = 100
- FPS = 60
- class Test:
- def __init__(self):
- pyxel.init(WIDTH, HEIGHT, caption = 'test!', fps = FPS)
- pyxel.run(self.update, self.draw)
- def update(self):
- if pyxel.btnp(pyxel.KEY_Q):
- pyxel.quit()
- def draw(self):
- pyxel.cls(1)
- pyxel.rectb(10, 1, 1, 10, 11)
- def sayHi(self):
- if pyxel.btn(pyxel.KEY_RIGHT) == True:
- print("hi")
- Test()
Advertisement
Add Comment
Please, Sign In to add comment