JSTileMap icon indicating copy to clipboard operation
JSTileMap copied to clipboard

How to acces the Type parameter from a tile?

Open DessoCode opened this issue 5 years ago • 0 comments

Hello, sorry if this is super dead but I'm getting great use out of it! I'm making a game for Apple Watch and I added some Types to some tiles to add collision to them in script. I can get it to work with gid but I'd rather have something like: let tileNode = layerInfo.layer.tile(atCoord: point) if(tileNode.type == "Floor") -> Add the collision

Is this possible? The data seems to be there in the .tmx file. Screenshot that explains it all: https://i.imgur.com/OkTTk6U.png

DessoCode avatar Sep 09 '20 07:09 DessoCode