No flags in save
This commit is contained in:
parent
b42da2f660
commit
4c80ff3004
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
.vscode
|
||||
*ce5eec52_2fa1_447b_8dad_764e267a7fab*
|
||||
|
||||
**/.DS_Store
|
||||
.DS_Store
|
||||
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
@ -243,7 +243,7 @@ control.prototype.clearStatus = function() {
|
||||
}
|
||||
|
||||
////// 重置游戏状态和初始数据 //////
|
||||
control.prototype.resetStatus = function(hero, hard, floorId, route, maps, values, flags) {
|
||||
control.prototype.resetStatus = function(hero, hard, floorId, route, maps, values) {
|
||||
|
||||
var totalTime=0;
|
||||
if (core.isset(core.status) && core.isset(core.status.hero)
|
||||
@ -292,9 +292,7 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps, value
|
||||
core.values = core.clone(values);
|
||||
else core.values = core.clone(core.data.values);
|
||||
|
||||
if (core.isset(flags))
|
||||
core.flags = core.clone(flags);
|
||||
else core.flags = core.clone(core.data.flags);
|
||||
core.flags = core.clone(core.data.flags);
|
||||
|
||||
core.events.initGame();
|
||||
|
||||
@ -2269,7 +2267,6 @@ control.prototype.saveData = function() {
|
||||
'maps': core.maps.save(core.status.maps),
|
||||
'route': core.encodeRoute(core.status.route),
|
||||
'values': core.clone(core.values),
|
||||
'flags': core.clone(core.flags),
|
||||
'shops': {},
|
||||
'version': core.firstData.version,
|
||||
"time": new Date().getTime()
|
||||
@ -2290,7 +2287,7 @@ control.prototype.saveData = function() {
|
||||
control.prototype.loadData = function (data, callback) {
|
||||
|
||||
core.resetStatus(data.hero, data.hard, data.floorId, core.decodeRoute(data.route), core.maps.load(data.maps),
|
||||
data.values, data.flags);
|
||||
data.values);
|
||||
|
||||
// load shop times
|
||||
for (var shop in core.status.shops) {
|
||||
|
||||
@ -304,13 +304,13 @@ core.prototype.clearStatus = function() {
|
||||
}
|
||||
|
||||
////// 重置游戏状态和初始数据 //////
|
||||
core.prototype.resetStatus = function(hero, hard, floorId, route, maps, values, flags) {
|
||||
core.control.resetStatus(hero, hard, floorId, route, maps, values, flags);
|
||||
core.prototype.resetStatus = function(hero, hard, floorId, route, maps, values) {
|
||||
core.control.resetStatus(hero, hard, floorId, route, maps, values);
|
||||
}
|
||||
|
||||
////// 开始游戏 //////
|
||||
core.prototype.startGame = function (hard, callback) {
|
||||
core.control.startGame(hard, callback);
|
||||
core.control.startGame(hard, callback);huo
|
||||
}
|
||||
|
||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||
|
||||
Loading…
Reference in New Issue
Block a user