Sign in to follow this  
Kiwi404

Dismemberment function, any advices ?

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

Share this post


Link to post
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

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.