englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.
MIT License
290 stars 31 forks source link

What is alternative for createFromObjects() here ? #32

Closed pooya72 closed 8 years ago

pooya72 commented 8 years ago

shall i use batch ? how it works ? Thx

englercj commented 8 years ago

There is convertTiledmap and convertTiledCollisionObjects, the former converts tiles into bodies, the later converts shapes you draw into bodies. The second one is more peformant and generally results in less shapes since you get to draw them yourself in Tiled.

Is that what you are asking? I'm very confused by your question.

https://github.com/englercj/phaser-tiled/blob/master/src/physics.js

pooya72 commented 8 years ago

i mean inserting objects and converting them to sprites in game.

http://phaser.io/docs/2.3.0/Phaser.Tilemap.html#createFromObjects

englercj commented 8 years ago

That functionality doesn't exist in this plugin.

pooya72 commented 8 years ago

sry for my endless questions, is that possible to know which tile, character hit ?

(then i can hide that sprite which is a coin).

actually i want to put coins and enemies, how you do this ?

englercj commented 8 years ago

Sounds like you want to use objects, not tiles. Using an object layer, placing "tile objects" and giving them physics.

englercj commented 8 years ago

Sounds like this is answered, closing.