X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2F__init__.py;h=8ab4ec265f87601ea47515238039c76fdb8a214b;hp=27faaf03364a52efd3f89b8eb8c3108fe4a1e85e;hb=a14b854db961815ff29962285bd4f632b98b98d9;hpb=5da55ac7eeae21ee0ca3149bed99c95383397f05 diff --git a/bulletml/__init__.py b/bulletml/__init__.py index 27faaf0..8ab4ec2 100644 --- a/bulletml/__init__.py +++ b/bulletml/__init__.py @@ -17,15 +17,13 @@ Basic Usage: 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