Advertisement
iful99

TULISAN MELOMPAT DI CANVAS

Nov 14th, 2014
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import appuifw,graphics,e32
  2.  
  3. def quit():
  4.   global play
  5.   play=0
  6. appuifw.app.exit_key_handler=quit
  7. appuifw.app.screen='full'
  8. appuifw.app.body=c=appuifw.Canvas()
  9. layar=c.size
  10. im=graphics.Image.new(layar)
  11.  
  12. t1=[50,90]
  13. t2=[50,100]
  14. t3=[50,200]
  15.  
  16. an=[t1,t2,t3]
  17. s=0
  18. d=0
  19. def animasi():
  20.   global d,s
  21.   if d<=0:
  22.     d=6
  23.     s+=1
  24.   if d>0: d-=1
  25.   if s>len(an)-1:s=0
  26.   im.text((an[s],an[s]),u'hore',0xff0ff,(u'',100))
  27. play=1
  28. while play:
  29.   im.clear(0)
  30.   animasi()
  31.   c.blit(im)
  32.   e32.ao_sleep(0.01)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement