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?
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)