Hello
Imagine a magical attack with a part that go behind the enemy and the part that go in front of this enemy. What I'd like to do is :
- MagicAttackSprite.behindImage
- EnemySprite
- MagicAttackSprite.infrontofImage
But it's not possible because MagicAttackSprite can only be either above or below EnemySprite. Because of this limitation, I can't put both images in the same sprite and I can't transform them at the same time by modifying the position/scale/rotation/skew of the sprite.
My solution is to make a new class that contains a reference to all the sprites that should be transformed the same way, as well as how they should be transformed. However, I'm not sure if this will work well for more complex animations like rotated sprites inside a rotated sprite. I think the best would be a way to apply the transformation to behindImage and infrontofImage like if they were in the MagicAttackSprite, without actually be in the MagicAttackSprite.
I hope this isn't too confusing