Jump to content

putTile(); What is the tile index?


Doodlemeat
 Share

Recommended Posts

Hello.

 

I am playing around with Phaser tilemap and I stumbled upon the putTile() method which is very neat except from one thing. I don't understand the first parameter.

 

map.putTile(1, 0, 0, backgroundLayer);

 

To get the first image, located in the upper left corner, I have to put 1 as the tile index, but I think that is wrong. 0 is the first index position and therefore, it should work if I put a 0 as first parameter. But if I do that, I get this error message: 

  1. Uncaught TypeError: Cannot read property '2' of undefined phaser.js:53733

 

I am using Phaser 2.0.4

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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