summaryrefslogtreecommitdiff
path: root/src/mapdata.py
blob: 2a19da675f42b64d179d1d337c6103060b21171b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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