Hi,
I'm programming a Counter right now. I can add and subtract values when my actor collects a gift.
Now the problem: How can I give the value to the new world?
My idea: I have programmed an integer called "level". And then it says
" if (level == 1)
{
Level1 lev = (Level1) getWorld();
lev.subtractToCounter(1);
}
if (level == 2)
{
Level2 lev = (Level2) getWorld();
lev.subtractToCounter(1);
}
.
.
.
.
This works, but I have 20 levels, so this is a bad idea. Are there any other options to make this easier?