diff pytouhou/vm/eclrunner.py @ 152:86807b8a63bd

Add collisions with enemies and items.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 09 Oct 2011 15:32:43 -0700
parents 5cf927cbd9c5
children 364935f6e313
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -699,6 +699,7 @@ class ECLRunner(object):
     @instruction(103)
     def set_hitbox(self, width, height, depth):
         self._enemy.hitbox = (width, height)
+        self._enemy.hitbox_half_size = (width / 2., height / 2.)
 
 
     @instruction(104)