Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DessoCode opened this issue Sep 9, 2020 · 0 comments
Open

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

DessoCode opened this issue Sep 9, 2020 · 0 comments

Comments

@DessoCode
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant