class KPLayer(object): def __init__(self): self.name = '' self.tileset = '' self.objects = [] class KPNodeAction(object): def __init__(self): pass class KPNode(object): def __init__(self): self.position = (0,0) self.actions = [] class KPPathSegment(object): def __init__(self): self.start = None self.end = None self.animation = None # default class KPPath(object): def __init__(self): self.startNode = None self.endNode = None self.segments = [] class KPDoodad(object): def __init__(self): self.position = (0,0) self.angle = 0 self.scale = (0,0) class KPMap(object): def __init__(self): self.nextLayerNumber = 1 self.layers = [self.createNewLayer() for x in range(4)] self.nodes = [] self.paths = [] self.doodads = [] def createNewLayer(self): layer = KPLayer() layer.name = "Layer %d" % self.nextLayerNumber self.nextLayerNumber += 1 return layer