When my game is running my levels get unlocked just fine even if I switch between layouts such as main menu, howto play etc whenever I goto level selection layout all the level I have unlocked are there but when I exit my game and re open it my levels are locked again?
When the game is reatarted all variables are set back to their original value, it's like starting the game for the first time..
To "solve" this you should use local storage and/or savegames to store the state the game is in..
I'm using webstorage but how do I check if my key exist after I restart LittleStain
Develop games in your browser. Powerful, performant & highly capable.
If you are using webstorage, you use the condition: webstorage key exists
If you are using local storage you use the action: check item exists
LittleStain if webstorage key exists than what action to load it?