Browse Source

Include

master
Maximilian 6 years ago
parent
commit
85481924b2
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      main.py

+ 3
- 3
main.py View File

global x_balken global x_balken
global y_balken global y_balken
x_balken=25 x_balken=25
y_balken=200
y_balken=215
width = 50 width = 50
height = 20 height = 20
return pygame.Rect(x_balken,y_balken,width,height) return pygame.Rect(x_balken,y_balken,width,height)


keys=pygame.key.get_pressed() keys=pygame.key.get_pressed()


if keys[pygame.K_a]:
if keys[pygame.K_LEFT]:
speed_balken[0]= -1 speed_balken[0]= -1


if keys[pygame.K_d]:
if keys[pygame.K_RIGHT]:
speed_balken[0]= 1 speed_balken[0]= 1





Loading…
Cancel
Save