Hi all !
I am developing a game in Cocos2d js using cocos ide.
I want to give a dialog box to select language which only appears only at the first launch of the game, any Ideas ?
Thanks …
Hi all !
I am developing a game in Cocos2d js using cocos ide.
I want to give a dialog box to select language which only appears only at the first launch of the game, any Ideas ?
Thanks …
I did it by using a boolean value in UserDefault which was true at the first run.
After showing the dialog box I saved it to false.
I am new to cocos2d, can u please tell where is this “UserDefault” ?
My bad. UserDefault is not used in JS.
You can just use local storage
var ls = cc.sys.localStorage;
var value = "FirstRun";
var key = false;
ls.setItem(key, value);