initial creation of the clas
This commit is contained in:
parent
3a81de28bc
commit
56ed20a985
1 changed files with 7 additions and 1 deletions
|
@ -94,6 +94,11 @@ class Bullet(Object):
|
||||||
Object.__init__(self, frames, pos, (0, 0))
|
Object.__init__(self, frames, pos, (0, 0))
|
||||||
self.type = type
|
self.type = type
|
||||||
|
|
||||||
|
class Player(Object):
|
||||||
|
def __init__(self, frames, pos, speed):
|
||||||
|
Object.__init__(self, frames, pos, speed)
|
||||||
|
|
||||||
|
|
||||||
def init_gfx():
|
def init_gfx():
|
||||||
"""graphics initialisation"""
|
"""graphics initialisation"""
|
||||||
|
|
||||||
|
@ -163,7 +168,8 @@ wait_keypress()
|
||||||
nbframe = 0
|
nbframe = 0
|
||||||
|
|
||||||
# create_player
|
# 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
|
# background
|
||||||
globals.background = pygame.image.load(os.path.join('data', 'background.bmp')).convert()
|
globals.background = pygame.image.load(os.path.join('data', 'background.bmp')).convert()
|
||||||
|
|
Loading…
Reference in a new issue