SHARE
TWEET

Untitled

a guest Oct 21st, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. auto_slika = pg.image.load("auto.png")
  2. (sirina_auta, visina_auta) = (auto_slika.get_width(), auto_slika.get_height())
  3.  
  4. auto_v = 100          
  5. auto_x = 0          
  6. auto_y = visina - visina_auta
  7. frejmova_u_sekundi = 25    
  8. dt = 1 / frejmova_u_sekundi    
  9.  
  10. def crtaj():
  11.     prozor.fill(pg.Color("white"))    
  12.     prozor.blit(auto_slika, (auto_x, auto_y))
  13.  
  14. def novi_frejm():
  15.     global auto_x          
  16.     auto_x += auto_v * dt      
  17.     if auto_x > sirina:      
  18.         auto_x = - sirina_auta  
  19.     crtaj()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top