Hello Guest

Author Topic: Tilemap update  (Read 13188 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap update
« Reply #15 on: April 20, 2013, 11:59:53 pm »
I'll fix that, thanks for reporting.

Logon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Tilemap update
« Reply #16 on: April 21, 2013, 12:14:04 am »
There is another thing you need to do

                        if (chunk.Dirty || forceBuild)
                        {
                            SpawnPrefabsForChunk(tileMap, chunk, baseX, baseY);
                        }

just add
  public static void SpawnPrefabs(tk2dTileMap tileMap, forceBuild = false)


and pass the forcebuild variable from the build function

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap update
« Reply #17 on: April 21, 2013, 12:18:11 am »
Yes I am aware of that one. Thanks for reporting - I've added a link to my trello. It wont be forgotten in the next release.

I need to think this through - especially for prefab spawning. Behaviour in game will need to be defined properly depending on usage - in my use, I've always used the prefabs for enemies or other dynamic objects - it doesn't make sense to destroy them and recreate something else in their place. in any case, I'll resolve this properly in the next tilemap release.

Logon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Tilemap update
« Reply #18 on: April 21, 2013, 12:41:30 am »
I acually implemented poolmanager into your function so it's muuuuch faster now with the fix i did too but thanks for looking into the function for the next release!