[Tutor] hey, a bit of a noob at python ut a question about animation...
John Jojo
maximo7274 at gmail.com
Sat Apr 12 18:46:54 CEST 2008
I am trying to make a simple animation, and this is what I have.
from livewires import games, color
games.init(screen_width = 1000, screen_height = 1000, fps = 50)
class Animation(games.Sprite):
files1 = ["stick1.jpg"]
files2 = ["stick2.jpg"]
def __init__(self):
self.animate1()
def animate1(self):
act = games.Animation(images = Animation.files1,
x = 500,
y = 500,
n_repeats = 5,
repeat_interval = 5)
def animate2(self):
act = games.Animation(images = Animation.files2,
x = 500,
y = 500,
dy = 1,
lifetime = 5 * games.screen.fps,
repeat_interval = 5,
after_death = games.screen.quit)
def main():
wall_image = games.load_image("class.jpg", transparent = False)
games.screen.background = wall_image
animater = Animation()
games.screen.add(animater)
games.screen.mainloop()
main()
I use the after_death item because it is used for the games.Message()
command and I thought it would do the same thing here. It doesn't. So does
anyone know the command to show after an animation is over???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080412/18cab7a9/attachment.htm
More information about the Tutor
mailing list