from bulletml import Bullet, BulletML
doc = Bulletml.BulletML.FromDocument(open("test.xml", "rU"))
+ player = ... # On your own here, but it needs x and y fields.
rank = 0.5 # Player difficulty, 0 to 1
- params = [] # Initial variable settings, usually empty
- actions = [a(params, rank) for a in doc.actions]
- bullet = Bullet(x, y, target=player, actions=actions, rank=rank)
+ bullet = Bullet.FromDocument(doc, x, y, target=player, rank=rank)
bullets = [bullet]
...
for bullet in bullets:
bullets.extend(bullet.step())
-
...
For drawing, you're on your own, but Bullet instances have a number of