SHARE
TWEET

Untitled

a guest Jan 18th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import risar, os
  2. from random import randint, random
  3.  
  4. face = []
  5. vx = []
  6. vy = []
  7. for fn in os.listdir("slike"):
  8.     faca = risar.slika(randint(0, risar.maxX-100), randint(0, risar.maxY-100),
  9.                        "slike/"+fn)
  10.     face.append(faca)
  11.     vx.append(2+random() * 3)
  12.     vy.append(2+random() * 3)
  13.  
  14. for i in range(5000):
  15.     for i in range(len(face)):
  16.         faca = face[i]
  17.         faca.setPos(faca.x() + vx[i], faca.y() + vy[i])
  18.         if not (0 < faca.x() < risar.maxX - 35):
  19.             vx[i] = -vx[i]
  20.         if not (0 < faca.y() < risar.maxY - 35):
  21.             vy[i] = -vy[i]
  22.     risar.cakaj(0.01)
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