+ @classmethod
+ def FromDocument(cls, doc, x=0, y=0, direction=0, speed=0, target=None,
+ params=(), rank=0.5, Action=Action):
+ """Construct a new Bullet from a loaded BulletML document."""
+ actions = [a(params, rank) for a in doc.actions]
+ return cls(x=x, y=y, direction=direction, speed=speed,
+ target=target, actions=actions, rank=rank, Action=Action)
+