📄 gamehandle.java
字号:
checkDeath(r,m,row,col);//check death
checkDeath(c,m,row,col);
checkDeath(c2,m,row,col);
}break;
case 1:{
// return;//裁剪掉
}break;
case 2:{
// return;//裁剪掉
}break;
case 3:{
int i;
//中间的泡泡
for(i=2;i<9;i++){//2列到9列长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[1][i].ix,
m.mapPosit[1][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,1,i);//check death
checkDeath(c,m,1,i);
checkDeath(c2,m,1,i);
}
//边缘泡泡
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[1][i].ix,
m.mapPosit[1][i].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,1,i);//check death
checkDeath(c,m,1,i);
checkDeath(c2,m,1,i);
}break;
case 4:{
int i;
for(i=2;i<8;i++){//2行到9行长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[i][1].ix,
m.mapPosit[i][1].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
1);
checkDeath(r,m,i,1);//check death
checkDeath(c,m,i,1);
checkDeath(c2,m,i,1);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[i][1].ix,
m.mapPosit[i][1].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,i,1);//check death
checkDeath(c,m,i,1);
checkDeath(c2,m,i,1);
}break;
}
}
//1行9列的泡泡
if( ((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtRow == 1 &&
((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtCol ==8 ){
System.out.println("18 pop");
switch( nCurrentFrame ){
case 0:{
r.bomb.paintImage(GameManage.g,//绘图
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.ix,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row,col);//check death
checkDeath(c,m,row,col);
checkDeath(c2,m,row,col);
}break;
case 1:{
int i;
for(i=7;i>1;i--){//7列到1列长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[1][i].ix,
m.mapPosit[1][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,1,i);//check death
checkDeath(c,m,1,i);
checkDeath(c2,m,1,i);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[1][i].ix,
m.mapPosit[1][i].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,1,i);//check death
checkDeath(c,m,1,i);
checkDeath(c2,m,1,i);
}break;
case 2:{
// return;//裁剪掉
}break;
case 3:{
//
}break;
case 4:{
int i;
for(i=2;i<8;i++){//2行到9行长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[i][8].ix,
m.mapPosit[i][8].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
1);
checkDeath(r,m,i,8);//check death
checkDeath(c,m,i,8);
checkDeath(c2,m,i,8);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[i][8].ix,
m.mapPosit[i][8].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,i,8);//check death
checkDeath(c,m,i,8);
checkDeath(c2,m,i,8);
}break;
}
}
if( ((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtRow == 8 &&
((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtCol == 8 ){//99的泡泡
System.out.println("88 pop");
switch( nCurrentFrame ){
case 0:{
r.bomb.paintImage(GameManage.g,//绘图
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.ix,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row,col);//check death
checkDeath(c,m,row,col);
checkDeath(c2,m,row,col);
}break;
case 1:{
int i;
for(i=7;i>1;i--){//7列到1列长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[8][i].ix,
m.mapPosit[8][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,8,i);//check death
checkDeath(c,m,8,i);
checkDeath(c2,m,8,i);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[8][i].ix,
m.mapPosit[8][i].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,8,i);//check death
checkDeath(c,m,8,i);
checkDeath(c2,m,8,i);
}break;
case 2:{
int i;
for(i=7;i>1;i--){//7行到1行长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[i][8].ix,
m.mapPosit[i][8].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
1);
checkDeath(r,m,i,8);//check death
checkDeath(c,m,i,8);
checkDeath(c2,m,i,8);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[i][8].ix,
m.mapPosit[i][8].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,i,8);//check death
checkDeath(c,m,i,8);
checkDeath(c2,m,i,8);
}break;
case 3:{
//
}break;
case 4:{
}break;
}
}
if( ((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtRow == 8 &&
((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtCol == 1 ){//81的泡泡
System.out.println("81 pop");
switch( nCurrentFrame ){
case 0:{
r.bomb.paintImage(GameManage.g,//绘图
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.ix,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row,col);//check death
checkDeath(c,m,row,col);
checkDeath(c2,m,row,col);
}
case 1:{
}break;
case 2:{
int i;
for(i=7;i>1;i--){//7行到1行长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[i][1].ix,
m.mapPosit[i][1].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
1);
checkDeath(r,m,i,1);//check death
checkDeath(c,m,i,1);
checkDeath(c2,m,i,1);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[i][1].ix,
m.mapPosit[i][1].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,i,1);//check death
checkDeath(c,m,i,1);
checkDeath(c2,m,i,1);
}break;
case 3:{
int i;
for(i=2;i<8;i++){//7列到1列长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[8][i].ix,
m.mapPosit[8][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,8,i);//check death
checkDeath(c,m,8,i);
checkDeath(c2,m,8,i);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[8][i].ix,
m.mapPosit[8][i].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,8,i);//check death
checkDeath(c,m,8,i);
checkDeath(c2,m,8,i);
}break;
case 4:{
}break;
}
}
if( ((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtCol != 1 &&
((Bomb.Pop) r.bomb.popQueue.elementAt(0)).amBlast.btAtCol != 8 ){//up down的泡泡
System.out.println("up down");
switch( nCurrentFrame ){
case 0:{
r.bomb.paintImage(GameManage.g,//绘图
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.ix,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row,col);//check death
checkDeath(c,m,row,col);
checkDeath(c2,m,row,col);
}break;
case 1:{
int i;
for(i=col-1;i>1;i--){//7行到1行长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[row][i].ix,
m.mapPosit[row][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,row,i);//check death
checkDeath(c,m,row,i);
checkDeath(c2,m,row,i);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[row][i].ix,
m.mapPosit[row][i].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row,i);//check death
checkDeath(c,m,row,i);
checkDeath(c2,m,row,i);
}break;
case 2:{
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[row-1][col].ix,
m.mapPosit[row-1][col].iy,
r.bomb.imgBlast,//绘制爆炸
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
((Bomb.Pop)r.bomb.popQueue.elementAt(0)).amBlast.btCurrentIndex);
checkDeath(r,m,row-1,col);//check death
checkDeath(c,m,row-1,col);
checkDeath(c2,m,row-1,col);
}break;
case 3:{
int i;
for(i=col+1;i<8;i++){//7列到1列长的爆炸
r.bomb.paintImage(GameManage.g,
m.mapPosit[row][i].ix,
m.mapPosit[row][i].iy,
r.bomb.imgBlast,
r.bomb.btBalstTotalRow,
r.bomb.btBalstTotalCol,
2);
checkDeath(r,m,row,i);//check death
checkDeath(c,m,row,i);
checkDeath(c2,m,row,i);
}
r.bomb.paintImage(GameManage.g,//绘图
m.mapPosit[row][i].ix,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -