Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. import random
  2. from scene import *
  3.  
  4. class MyScene (Scene):
  5. def setup(self):
  6. # This will be called before the first frame is drawn.
  7. pass
  8.  
  9. def draw(self):
  10. # This will be called for every frame (typically 60 times per second).
  11. background(0, 0, 255)
  12. # Draw a red circle for every finger that touches the screen:
  13. for touch in self.touches.values():
  14.  
  15.  
  16. fill(random.random(), random.random(), random.random())
  17. rect(touch.location.x + 100, touch.location.y + 50, 50, 50)
  18. fill(random.random(), random.random(), random.random())
  19. rect(touch.location.x + 100, touch.location.y + 50, 50, 100)
  20. fill(random.random(), random.random(), random.random())
  21. rect(touch.location.x + 100, touch.location.y + 200, 50, 50)
  22. def touch_began(self, touch):
  23. pass
  24.  
  25. def touch_moved(self, touch):
  26. pass
  27.  
  28. def touch_ended(self, touch):
  29. pass
  30.  
  31.  
  32. run(MyScene())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement