Hello Guest

Author Topic: Accessing individual sprite from tilemap  (Read 4049 times)

jeong1135

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Accessing individual sprite from tilemap
« on: August 08, 2013, 04:19:16 am »
Again, I'm completely in love with tk2dtilemap. Thank you for such a wonderful tool.

I'm generating my 2d dungeon out of JSON script, mostly using bunch of tk2dtilemap SetTile() and Build().
As a dungeon crawler, when you go from room A to room B, there needs to be a transition that scrolls the map.

Here is my question:

Room A and Room B data are held separately but drawn on the same Tilemap. During room transition, I need to fade out Room A and fade in Room B.
How do I get a hold of this collection of sprite data after SetTile() which returns nothing?

Thank you always for prompt support!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Accessing individual sprite from tilemap
« Reply #1 on: August 08, 2013, 08:58:32 am »
You can't get a collection like that - perhaps you could have each room in layers? You could fade out by drawing a black sprite in front of everything, and then turn the layers on and off respectively, and fade back in?

You could also simply have the layers at different positions - that'll work too.

Does that answer your question?

jeong1135

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Accessing individual sprite from tilemap
« Reply #2 on: August 09, 2013, 08:33:13 am »
I chose to go for black sprite. Thank you.