Commit 7ad61ecd authored by zjz1994's avatar zjz1994

调整猩猩

parent b517119c
...@@ -1190,14 +1190,16 @@ export default class MainScene extends Scene { ...@@ -1190,14 +1190,16 @@ export default class MainScene extends Scene {
pongorfootdata = videoItem; pongorfootdata = videoItem;
} }
} }
var iscreate = this.waitDataCreatePongo(pongo);
var pongoidx = pongo.index; var pongoidx = pongo.index;
if(iscreate){ var createidx = this.havecreate.indexOf(pongoidx);
var createidx = this.havecreate.indexOf(pongoidx); if(createidx==-1){
if(createidx==-1){ var iscreate = this.waitDataCreatePongo(pongo);
if(iscreate){
this.havecreate.push(pongoidx);
} }
} }
}) })
} }
...@@ -3298,6 +3300,53 @@ export default class MainScene extends Scene { ...@@ -3298,6 +3300,53 @@ export default class MainScene extends Scene {
npdata.addnum = 1; npdata.addnum = 1;
} }
} }
//特效消除猩猩
var pongor = [
{
row:lat1.row-1,
col:lat1.column
},
{
row:lat1.row,
col:lat1.column
},
{
row:lat1.row+1,
col:lat1.column
}
];
var pongoc = [
{
row:lat1.row,
col:lat1.column-1
},
{
row:lat1.row,
col:lat1.column
},
{
row:lat1.row,
col:lat1.column+1
}
];
for(var pr1=0;pr1<pongor.length;pr1++){
var prcdata = pongor[pr1];
var prcrow = prcdata.row;
var prccol = prcdata.col;
if(prcrow>=0&&prcrow<Tool.rowNum&&prccol>=0&&prccol<Tool.colNum){
this.checkPongoHVEle(prcrow,prccol,"hor");
}
}
for(var pc1=0;pc1<pongoc.length;pc1++){
var prcdata = pongoc[pc1];
var prcrow = prcdata.row;
var prccol = prcdata.col;
if(prcrow>=0&&prcrow<Tool.rowNum&&prccol>=0&&prccol<Tool.colNum){
this.checkPongoHVEle(prcrow,prccol,"vir");
}
}
//回收 //回收
this.recoverEle(one) this.recoverEle(one)
this.recoverEle(two) this.recoverEle(two)
...@@ -3316,6 +3365,8 @@ export default class MainScene extends Scene { ...@@ -3316,6 +3365,8 @@ export default class MainScene extends Scene {
} }
} }
} }
} }
//如果两个爆炸 //如果两个爆炸
else if(ele1.effectType == EffectType.EXPLOSIVE && ele2.effectType == EffectType.EXPLOSIVE) { else if(ele1.effectType == EffectType.EXPLOSIVE && ele2.effectType == EffectType.EXPLOSIVE) {
......
...@@ -46,7 +46,7 @@ export const Chapters24: ChapterData[] = [ ...@@ -46,7 +46,7 @@ export const Chapters24: ChapterData[] = [
1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2,
1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,
1, 4, 4, 1, 1, 2, 2, 2, 1, 1, 4, 4, 1, 1, 2, 1, 2, 1,
23, 23, 23, 23, 1, 23, 23, 23, 23, 23, 23, 23, 23, 1, 23, 23, 23, 23,
23, 23, 23, 23, 1, 23, 23, 23, 23 23, 23, 23, 23, 1, 23, 23, 23, 23
], baseElements: [ ], baseElements: [
...@@ -55,8 +55,8 @@ export const Chapters24: ChapterData[] = [ ...@@ -55,8 +55,8 @@ export const Chapters24: ChapterData[] = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 14, 12, 0, 0, 0, 0, 0, 0, 0, 13, 11, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0
], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } }, ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } },
......
...@@ -73,8 +73,8 @@ chapters.forEach((chapter,index) => { ...@@ -73,8 +73,8 @@ chapters.forEach((chapter,index) => {
*/ */
export function getChapterData(index: number): ChapterData { export function getChapterData(index: number): ChapterData {
//没有数据就返回第一关数据 //没有数据就返回第一关数据
return chapters[604]; // return chapters[604];
return chapters[index] || chapters[604]; return chapters[index] || chapters[1];
} }
var a = { var a = {
......
...@@ -272,7 +272,6 @@ export class Element extends eui.Component { ...@@ -272,7 +272,6 @@ export class Element extends eui.Component {
this.addChild(this.states[state]); this.addChild(this.states[state]);
} }
createPongo(pongomvdata:any,pongolfootdata:any,pongorfootdata:any,){ createPongo(pongomvdata:any,pongolfootdata:any,pongorfootdata:any,){
console.log("开始创建猩猩");
if(this.pongoMoveClip){ if(this.pongoMoveClip){
if(this.pongoMoveClip.parent){ if(this.pongoMoveClip.parent){
this.pongoMoveClip.parent.removeChild(this.pongoMoveClip); this.pongoMoveClip.parent.removeChild(this.pongoMoveClip);
...@@ -304,7 +303,6 @@ export class Element extends eui.Component { ...@@ -304,7 +303,6 @@ export class Element extends eui.Component {
} }
} }
initPongoMoveClip(){ initPongoMoveClip(){
console.log("创建了一个猩猩",this.pongoMoveClip);
var boxwidth = 80; var boxwidth = 80;
var boxheight = 80; var boxheight = 80;
var mvwidth = 161; var mvwidth = 161;
......
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