From 85982e9fca2573521206ba6bb231c7ec7cd3bc81 Mon Sep 17 00:00:00 2001 From: kleph Date: Mon, 22 Feb 2010 23:38:44 +0100 Subject: [PATCH] added variable speed bullets (type2) --- pyshoot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyshoot.py b/pyshoot.py index b4a8ee7..f228005 100755 --- a/pyshoot.py +++ b/pyshoot.py @@ -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))