X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2Fparser.py;fp=bulletml%2Fparser.py;h=5435925f753c2c324fe935abf89eb23fdaa69e27;hp=9d515a24b9e476343a9d829b1492454095850559;hb=781dc628702361a759834ca5fdf117679d33f76a;hpb=d72980b6368d0ac1de1ae1091bfb0582e9afcb1d diff --git a/bulletml/parser.py b/bulletml/parser.py index 9d515a2..5435925 100644 --- a/bulletml/parser.py +++ b/bulletml/parser.py @@ -361,9 +361,6 @@ class Accel(object): class BulletDef(object): """Bullet definition.""" - direction = None - speed = None - def __init__(self, actions=(), direction=None, speed=None, tags=()): self.direction = direction self.speed = speed @@ -557,7 +554,9 @@ class Offset(object): def __setstate__(self, state): state = dict(state) - self.__init__(state["type"], state.get("x"), state.get("y")) + x = NumberDef(state["x"]) if "x" in state else None + y = NumberDef(state["y"]) if "y" in state else None + self.__init__(state["type"], x, y) @classmethod def FromXML(cls, doc, element):