Jump to content

Dismemberment function, any advices ?


Kiwi404
 Share

Recommended Posts

Hi,

I'm making a dismemberment function of a sprite (human) when it died.

This is how i see it :

  • Get 6 bitmap (pooled)
  • Copy with copyRect part of the sprite's texture (legs, torso, ...) and  eventually resize these bitmaps
  • Get 6 Image (pooled) and apply theses different textures
  • Play some tweens to make parts fly randomly
  • When tweens finished, free the 6 bitmaps and 6 image ( return to pool queue)

Do you have any advices ( performance, ...) about this way ?

Thanks

Link to comment
Share on other sites

@BdR i need a destination bitmapData to do all the copyRect... work and then apply this new texture to the image.

So if i understand what you mean, the 6 images have already a bitmapData associated (when they are instantiated) and i should use it instead of taking another bitmapData ?

Thanks

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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