BigBacon Posted June 11, 2020 Share Posted June 11, 2020 I am building a simple board game, all the pieces are tiles. I want to reflect the health of some of the pieces so I wanted to add a number onto the tile. I created a couple functions to replace removeTileAt and putTileAt, these just call the normal DynamicTileMap functions and then also draw or delete the number in text on the tile. However, I would really like to extend some class in Phaser3 that draws the tiles and just add the text drawing there, or at least that seems like what I want to do but I really don't understand enough object stuff or phaser to figure out where to do it, I don't see any draw function for the tile class which I thought I would just overrride. What I have works but seems ugly! All thoughts appreciated! Link to comment Share on other sites More sharing options...
PutUOnTheMap Posted November 23, 2020 Share Posted November 23, 2020 Hi, Im in a similiar situation as you. Ive created dynamic tile layer and simply added text Tilemap.forEachTile using the coordinates of each tile. The problem is that when I move the Tilemap to diferent position the text doesnt move. Even if i change the position of tilemap before adding the text. For some reason, even tho, the tiles themselves are located elsewhere, their coordinates remains 0,0; 0,1 and so on. I know that i didnt help u at all and asking u for help instead and that its kinda rude. But if u could point me in a direction how to aproach this in other way id be rly glad. Link to comment Share on other sites More sharing options...
Recommended Posts