Commit 9ad2908b authored by zjz1994's avatar zjz1994

食物关卡兼容

parent 96e59e0f
...@@ -1185,6 +1185,7 @@ export default class MainScene extends Scene { ...@@ -1185,6 +1185,7 @@ export default class MainScene extends Scene {
//食物 //食物
initFoods(){ initFoods(){
var foodsdata = this.chapterData.map.foodsdata; var foodsdata = this.chapterData.map.foodsdata;
if(foodsdata){
for(var i=0;i<foodsdata.length;i++){ for(var i=0;i<foodsdata.length;i++){
var ifood = foodsdata[i]; var ifood = foodsdata[i];
var ifoodtype = ifood.type; var ifoodtype = ifood.type;
...@@ -1208,6 +1209,7 @@ export default class MainScene extends Scene { ...@@ -1208,6 +1209,7 @@ export default class MainScene extends Scene {
// console.log("食物处理",ifoodtype); // console.log("食物处理",ifoodtype);
} }
} }
}
//初始化地图格子数据,包括生成口,联通口,次数,新加入reCoverAllLattice----LATTICE回收 //初始化地图格子数据,包括生成口,联通口,次数,新加入reCoverAllLattice----LATTICE回收
initLattices() { initLattices() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment