added variable speed bullets (type2)
This commit is contained in:
parent
c283049246
commit
85982e9fca
1 changed files with 9 additions and 0 deletions
|
@ -101,6 +101,15 @@ class BulletFactory():
|
||||||
bullet.damage = 10
|
bullet.damage = 10
|
||||||
return bullet
|
return bullet
|
||||||
|
|
||||||
|
def create_type2(self, pos, speed):
|
||||||
|
""" create a bullet of type 2
|
||||||
|
temporary ennemies bullet """
|
||||||
|
|
||||||
|
bullet = Bullet(['bullet.bmp'], 0, pos)
|
||||||
|
bullet.speed = speed
|
||||||
|
bullet.damage = 10
|
||||||
|
return bullet
|
||||||
|
|
||||||
class Bullet(Object):
|
class Bullet(Object):
|
||||||
def __init__(self, frames, type, pos):
|
def __init__(self, frames, type, pos):
|
||||||
Object.__init__(self, frames, pos, (0, 0))
|
Object.__init__(self, frames, pos, (0, 0))
|
||||||
|
|
Loading…
Reference in a new issue