Hello!
I have a question. How to exchange sprites so its optimal and so that it does not take to much memory. My situation looks like this:
Sprite* animalSprite = Sprite::create("cat.png");
but the sprite “animalSprite” is changing every second so is it ok to do something like this:
if (dog)
animalSprite = Sprite::create("dog.png");
else
animalSprite = Sprite::create("cat.png");
every second?
Will the memory be cleaned or should I do it in an other way? I cant do something like dogSprite and catSprite
I need only 1 sprite and thats animalSprite. So will the Sprite::create kill the device?