Jump to content

Tilemap - custom tile properties/methods


goowik
 Share

Recommended Posts

Hi,

I've been planning out my own Bomberman game. The idea is to make it multiplayer somewhere in the near future.

As for the creation of the maps I liked the idea of using the TileMap functionality and have certain tiles reside in layers.

But... having properties set for example in the application "Tiled" is not something I like or want to do. So my question is:

 

When Phaser creates a Tile is their maybe a callback that can be used upon creation of each Tile to append function/methods? Or should I create my own TileMap class?

 

The idea is for example to add functions on collision like:

function update (target) { // target being the colliding player, bomb or any other entity

  teleportRandom(target);

}

 

I hope my question is clear enough :)

Thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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