Jump to content

how to get specific data from json/tilemap ?


syawqy
 Share

Recommended Posts

I want to get player position from my map created with tiled

it's a json file

basically I want something like this

player = createFromObjects(name, gid, key, frame, exists, autoCull, group, CustomClass, adjustY);player.body.collideWorldBounds = true;...

but, if there's no simple way, can someone teach me how to get the spesific data from json file

I want at least get x and y position so I can write something like this

player = game.add.sprite(data.x,data.y,'player');
Link to comment
Share on other sites

sorry if I am not clear enough, my goal is to store the created sprite as variable so that I can access it later and in the example it store them as group

maybe if there is a way to access it as a sprite it will solve my problem

thanks

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...