diff options
author | Treeki <treeki@gmail.com> | 2011-11-03 19:35:50 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-03 19:35:50 +0100 |
commit | fd78999a93710ba53c915779c126e664323a728f (patch) | |
tree | 593fb081b9533dff0731baa2e1731354007f7bea /src/mapdata.py | |
parent | 7635775ee641395eca839bf135ae29fbc2f64b23 (diff) | |
download | koopatlas-fd78999a93710ba53c915779c126e664323a728f.tar.gz koopatlas-fd78999a93710ba53c915779c126e664323a728f.zip |
added stuff preparing for the layer system
Diffstat (limited to '')
-rw-r--r-- | src/mapdata.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index b453172..2a19da6 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -1,7 +1,7 @@ class KPLayer(object): def __init__(self): + self.name = '' self.tileset = '' - self.size = (0,0) self.objects = [] @@ -39,10 +39,16 @@ class KPDoodad(object): class KPMap(object): def __init__(self): - self.layers = [] + self.nextLayerNumber = 1 + + self.layers = [self.createNewLayer() for x in range(4)] self.nodes = [] self.paths = [] self.doodads = [] - self.nextLayerNumber = 1 + def createNewLayer(self): + layer = KPLayer() + layer.name = "Layer %d" % self.nextLayerNumber + self.nextLayerNumber += 1 + return layer |