this is da images:
http://www.wikiupload.com/download_page.php?id=61430
this is da code:
from pyglet import window
from pyglet import image
win = window.Window()
win.set_mouse_visible(False)
@win.event
def set_fullscreen(self, fullscreen=True, screen=None):
pass
class background:
img = image.load('background.bmp')
class gun:
gun_img = image.load('gun.bmp')
x = 0
y = 0
class bullet:
img = image.load('bullet.bmp')
x = gun.x+10
y = gun.y
@win.event
def on_mouse_motion(x, y, dx, dy):
gun.x = x
gun.y = y-22
@win.event
def on_mouse_release(x, y, button, modifiers):
bullet.img.blit(bullet.x, bullet.y)
while not win.has_exit:
win.dispatch_events()
win.clear()
background.img.blit(1,1)
gun.gun_img.blit(gun.x, gun.y)
win.flip()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---