12345678910111213141516171819202122232425 |
- cc.Class({
- extends: cc.Component,
- properties: {
- Label:cc.Label
- },
- // 存储数据:cc.sys.localStorage.setItem(“key”,”value”)
- // 获取数据:cc.sys.localStorage.getItem(“key”)
-
- // 移除数据:cc.sys.localStorage.removeItem(“key”)
-
- // 清除所有:cc.sys.localStorage.clear()
- // use this for initialization
- onLoad: function () {
- this.Label.string = 'Level '+Global.LevelNow;
- },
- // called every frame
- update: function (dt) {
- },
-
- });
|