|
@@ -51,11 +51,13 @@ cc.Class({
|
|
this.getHighestLevel()
|
|
this.getHighestLevel()
|
|
},
|
|
},
|
|
getHighestLevel() {
|
|
getHighestLevel() {
|
|
- let highLevel = wx.getStorageSync('highLevel')
|
|
|
|
|
|
+ // let highLevel = wx.getStorageSync('highLevel')
|
|
|
|
+ let highLevel =cc.sys.localStorage.getItem('highLevel')
|
|
return highLevel
|
|
return highLevel
|
|
},
|
|
},
|
|
getHighestScore() {
|
|
getHighestScore() {
|
|
- let score = wx.getStorageSync('highScore')
|
|
|
|
|
|
+ //let score = wx.getStorageSync('highScore')
|
|
|
|
+ let score =cc.sys.localStorage.getItem('highScore')
|
|
return score
|
|
return score
|
|
},
|
|
},
|
|
// --------------- share ----------------
|
|
// --------------- share ----------------
|
|
@@ -108,8 +110,11 @@ cc.Class({
|
|
highScore = score
|
|
highScore = score
|
|
}
|
|
}
|
|
var highLevelName = this._controller.gameData.json.levelData[highLevel - 1].name
|
|
var highLevelName = this._controller.gameData.json.levelData[highLevel - 1].name
|
|
- wx.setStorageSync('highLevel', highLevel + '')
|
|
|
|
- wx.setStorageSync('highScore', highScore + '')
|
|
|
|
|
|
+
|
|
|
|
+ //wx.setStorageSync('highLevel', highLevel + '')
|
|
|
|
+ //wx.setStorageSync('highScore', highScore + '')
|
|
|
|
+ cc.sys.localStorage.setItem('highLevel', highLevel + '');
|
|
|
|
+ cc.sys.localStorage.setItem('highScore', highScore + '');
|
|
self._controller.scoreMgr.failHighScore.string = "您的最高分:" + (highScore + '')
|
|
self._controller.scoreMgr.failHighScore.string = "您的最高分:" + (highScore + '')
|
|
var kvDataList = new Array()
|
|
var kvDataList = new Array()
|
|
kvDataList.push({
|
|
kvDataList.push({
|