From 56ed20a9855e8a9366202f033502b35b28f03f02 Mon Sep 17 00:00:00 2001 From: kleph Date: Sat, 15 Aug 2009 02:31:57 +0200 Subject: [PATCH] initial creation of the clas --- pyshoot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyshoot.py b/pyshoot.py index d12ae17..0f695e3 100755 --- a/pyshoot.py +++ b/pyshoot.py @@ -94,6 +94,11 @@ class Bullet(Object): Object.__init__(self, frames, pos, (0, 0)) self.type = type +class Player(Object): + def __init__(self, frames, pos, speed): + Object.__init__(self, frames, pos, speed) + + def init_gfx(): """graphics initialisation""" @@ -163,7 +168,8 @@ wait_keypress() nbframe = 0 # create_player -player = Object(['player1_1.bmp'], (50, 50), (0, 0)) +# player = Object(['player1_1.bmp'], (50, 50), (0, 0)) +player = Player(['player1_1.bmp'], (50, 50), (0, 0)) # background globals.background = pygame.image.load(os.path.join('data', 'background.bmp')).convert()