-
Notifications
You must be signed in to change notification settings - Fork 0
2. Cs2dMap
the Cs2dMap is an object that represents a cs2d map, this includes metadata, tileset data, background data, map tiles, entities.
all these can be modified by using the appropriate method's
Cs2dMetadata metadata = cs2dMap.getMetadata()
Cs2dBackground background = cs2dMap.getBackground()
Cs2dTiles tiles = cs2dMap.getTiles()
Cs2dMapArray mapArray = cs2dMap.getMapArray()
Cs2dEntities entities = cs2dMap.getEntities()
it is important to understand that each of these methods wraps alot of raw data under the hood into more easy-to-use objects for the developer, this means that calling each of these methods is quite heavy and should prefferably only by done once on each Cs2dMap file
once you finished working with each of these objects, they need to be re-written to the Cs2dMap
cs2dMap.update(mapArray)
this is effectivly commiting the changes you made