Skip to content

How to acces the Type parameter from a tile? #46

@DessoCode

Description

@DessoCode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions