diff pytouhou/game/bullet.py @ 142:c7f0fd9d2145

Simple collision detection
author Thibaut Girka <thib@sitedethib.com>
date Sun, 25 Sep 2011 20:56:14 +0200
parents 81e05aed8db5
children 30338dc33a7b
line wrap: on
line diff
--- a/pytouhou/game/bullet.py
+++ b/pytouhou/game/bullet.py
@@ -29,6 +29,8 @@ class Bullet(object):
         self._launched = False
         self._bullet_type = bullet_type
 
+        self.hitbox_half_size = bullet_type.hitbox_size / 2.
+
         self.speed_interpolator = None
         self.frame = 0
         self.grazed = False