X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2F__init__.py;h=8ab4ec265f87601ea47515238039c76fdb8a214b;hp=addc0fee1bce133a4c49fdd890b9bb9a6ecfbb63;hb=a14b854db961815ff29962285bd4f632b98b98d9;hpb=70d25195d561d8b5d3126c6bbac0ecad2a502f06 diff --git a/bulletml/__init__.py b/bulletml/__init__.py index addc0fe..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.top] - 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