Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://raw.githubusercontent.com/thebillington/tphysics/master/tphysics.py
- from tphysics import *
- g = Game("Test", 600, 600, "green")
- player = Rectangle(0, 0, 20, 50)
- player.fill_colour = "yellow"
- g.add_shape(player)
- while True:
- if g.ispressed("Right"):
- player.x += 1
- if g.ispressed("Left"):
- player.x -= 1
- if g.ispressed("Down"):
- player.y -= 1
- if g.ispressed("Up"):
- player.y += 1
- g.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement