Commit 9fe55a39 by BellCodeEditor

save project

parent b7c5c926
Showing with 29 additions and 1 deletions
...@@ -7,5 +7,33 @@ FPSCLOCK=pygame.time.Clock() ...@@ -7,5 +7,33 @@ FPSCLOCK=pygame.time.Clock()
position=[(180,90), (180,120),(210,120),(x,y)] position=[(180,90), (180,120),(210,120),(x,y)]
screen.blit(right,position[0,0]) screen.blit(right,position[0,0])
for i in range(len((position)-1): for i in range(len((position)-1):
screen.blit(body,position[i]) screen.blit(body,position[i])]
if event.key==locals.K_RIGHT and setheading !="left":
setheading = 'right'
if event.key==locals.K_RIGHT and setheading !="right":
setheading = 'left'
if event.key==locals.K_RIGHT and setheading !="down":
setheading = 'up'
if event.key==locals.K_RIGHT and setheading !="up":
setheading = 'down'
if setheading== "right":
x+=30
elif setheading=="left":
x-=30
elif setheading=="up":
y-=30
screen.blit(sna,position[0,0])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment