def update(self, entity): pos = entity.bag[self.prefix + 'x'], entity.bag[self.prefix + 'y'] angle = entity.bag[self.prefix + 'angle'] gfx.set_transform(self.gfx_id, pos, angle) # TODO should be based on entity property gfx.show_object(self.gfx_id, True)
def attach(self, entity): self.entity = entity gfx.show_object(self.gfx_id, True)