From 419d4a3a954c14529767984801887d4a73485513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B5=A9=E4=B9=90?= <89932980@qq.com> Date: Fri, 29 Jan 2016 10:35:16 +0800 Subject: [PATCH] =?UTF-8?q?updated=20=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game.js b/game.js index 4755e2b..909ce03 100644 --- a/game.js +++ b/game.js @@ -198,7 +198,6 @@ function Game(id,params){ }; //重置物体位置 Stage.prototype.resetItems = function(){ - this.status = 1; this.items.forEach(function(item,index){ _extend(item,item._settings,item._params); item.index = index; @@ -212,7 +211,6 @@ function Game(id,params){ }; //重置地图 Stage.prototype.resetMaps = function(){ - this.status = 1; this.maps.forEach(function(map){ _extend(map,map._settings,map._params); map.data = JSON.parse(JSON.stringify(map._params.data)); @@ -339,6 +337,7 @@ function Game(id,params){ this.setStage = function(index){ _stages[_index].status = 0; _index = index; + _stages[_index].status = 1; return _stages[_index]; }; //下个布景 @@ -346,6 +345,7 @@ function Game(id,params){ if(_index<_stages.length-1){ _stages[_index].status = 0; _index++; + _stages[_index].status = 1; return _stages[_index]; }else{ throw new Error('unfound new stage.');