Started entity parser
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from constants import CHUNK_WIDTH, CHUNK_HEIGHT, CHUNK_TILE_COUNT, TILE_WIDTH_HEIGHT
|
||||
from entityParser import parseEntity
|
||||
import math
|
||||
|
||||
def parseChunkLayerData(layer, mapData, chunkData):
|
||||
@ -101,7 +102,11 @@ def parseChunk(chunkX, chunkY, mapData):
|
||||
if ob['y'] >= (chunkData['topLeftTileY'] + CHUNK_HEIGHT) * TILE_WIDTH_HEIGHT:
|
||||
continue
|
||||
|
||||
chunkData['entities'].append(ob)
|
||||
ent = parseEntity(ob, chunkData)
|
||||
if ent is None:
|
||||
continue
|
||||
|
||||
chunkData['entities'].append(ent)
|
||||
|
||||
return chunkData
|
||||
|
||||
|
Reference in New Issue
Block a user