Kiwi404 Posted June 15, 2018 Share Posted June 15, 2018 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 More sharing options...
BdR Posted June 16, 2018 Share Posted June 16, 2018 Not advice but a question, why do you need 6 bitmaps? Can't it just be 6 sprites? That's probably less taxing on performance. Link to comment Share on other sites More sharing options...
Kiwi404 Posted June 17, 2018 Author Share Posted June 17, 2018 @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 More sharing options...
samme Posted June 17, 2018 Share Posted June 17, 2018 That sounds fine. Unless it's possible to just create separate images beforehand (in an image editor), then I would prefer that. Kiwi404 1 Link to comment Share on other sites More sharing options...
Recommended Posts