I would like to combine two sprites into one.
For example:
private Sprite spriteGirl;
private Sprite spriteSweater;
private Sprite spriteDressed;
..................................................................
atlas = new TextureAtlas(Gdx.files.internal("data/images.pack"));
spriteGirl = atlas.createSprite("girl");
spriteSweater = atlas.createSprite("sweater");
...................................................................
“spriteSweater” should be placed on the sprite “spriteGirl” (in certain coordinates). This combination is the sprite “spriteDressed”.
After this, the resulting sprite “spriteDressed” could be animated.
I’d rather move “spriteDressed” instead of “spriteGirl” and “spriteSweater” separately.
Any help is highly appreciated.
I’d create a composite class that holds and manages the sprites it is composed of.