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
|
||||
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):
|
||||
def __init__(self, frames, type, pos):
|
||||
Object.__init__(self, frames, pos, (0, 0))
|
||||
|
|
Loading…
Reference in a new issue