ABIX_Edukacja

Gra_Star_Wars

Mar 25th, 2020
704
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TITLE = "Moja pierwsza gra Star Wars"
  2. WIDTH = 1000
  3. HEIGHT = 800
  4.  
  5. glowa = Actor("actor1.png")
  6.  
  7. def draw():
  8.     screen.blit("fantasy1.jpg", (0, 0))
  9.     glowa.draw()
  10.  
  11.  
  12. def update():
  13.     if keyboard.d:
  14.         glowa.x += 5
  15.     if keyboard.a:
  16.         glowa.x -= 5
  17.     if keyboard.w:
  18.         glowa.y -= 5
  19.     if keyboard.s:
  20.         glowa.y += 5
  21.     if glowa.x > 1000:
  22.         glowa.x -= 30
  23.     if glowa.x < 0:
  24.         glowa.x += 30
  25.     if glowa.y > 800:
  26.         glowa.y -= 30
  27.     if glowa.y < 0:
  28.         glowa.y += 30
RAW Paste Data