Hello!
I'm creating a prototype for a custom character creation system. I have a sprite for hair, eyes, etc. Each sprite has multiple frames with different eyes/ hair etc. I've created arrow shaped buttons which the user can use to switch between frames for the different sprites. It looks like this:
the arrow shaped buttons have two instance variables, one boolean to go forward or backward, and a string to determine the sprite which has to be changed. Code looks like this:
This all works, but now i want to add a nose, mouth and other features. This will lead to lots of duplicate code. Is there a way i can make this more efficient?