X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2Fparser.py;h=187fa86e7df4dc5f866abd741c4939f9b62c7579;hp=0af66943893632fedcd3f5dac68a7defc216cb75;hb=181030a9517b3742250dadbf6df7ed633b50831e;hpb=9104092535823794c1b00f3c0fb16f5181992a00 diff --git a/bulletml/parser.py b/bulletml/parser.py index 0af6694..187fa86 100644 --- a/bulletml/parser.py +++ b/bulletml/parser.py @@ -181,10 +181,8 @@ class Accel(object): def __call__(self, params, rank): frames = self.term(params, rank) - horizontal = self.horizontal and ( - self.horizontal(params, rank), self.horizontal.type) - vertical = self.vertical and ( - self.vertical(params, rank), self.vertical.type) + horizontal = self.horizontal and self.horizontal(params, rank) + vertical = self.vertical and self.vertical(params, rank) return frames, horizontal, vertical def __repr__(self): @@ -207,9 +205,9 @@ class BulletDef(object): elif tag == "speed": self.speed = Speed(doc, subelem) elif tag == "action": - self.actions.append(ActionDef(doc, element)) + self.actions.append(ActionDef(doc, subelem)) elif tag == "actionRef": - self.actions.append(ActionRef(doc, element)) + self.actions.append(ActionRef(doc, subelem)) def __call__(self, params, rank): actions = [] @@ -296,7 +294,7 @@ class FireDef(object): for subelem in element.getchildren(): tag = realtag(subelem) if tag == "direction": - self.direction = Direction(doc, subelem) + self.direction = Direction(doc, subelem, "aim") elif tag == "speed": self.speed = Speed(doc, subelem) elif tag == "bullet":