Pyxel-6.sh
· 192 B · Bash
Orginalformat
import pyxel
pyxel.init(160, 120)
def update():
if pyxel.btnp(pyxel.KEY_Q):
pyxel.quit()
def draw():
pyxel.cls(0)
pyxel.rect(10, 10, 20, 20, 11)
pyxel.run(update, draw)
1 | import pyxel |
2 | |
3 | pyxel.init(160, 120) |
4 | |
5 | def update(): |
6 | if pyxel.btnp(pyxel.KEY_Q): |
7 | pyxel.quit() |
8 | |
9 | def draw(): |
10 | pyxel.cls(0) |
11 | pyxel.rect(10, 10, 20, 20, 11) |
12 | |
13 | pyxel.run(update, draw) |