毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

java手机游戏设计源代码 第14页

更新时间:2008-12-30:  来源:毕业论文

java手机游戏设计源代码 第14页
kkk=getHeight()/8;  }
}    if(((j1.getX()<=c1.getX()-18)||((j2.getX()-6)>=c1.getX()))&(jbz==0))
{if(j0.isVisible()){jbullet0.setVisible(true);} if(j1.isVisible()){
jbullet1.setVisible(true);}
if(j2.isVisible()) {
jbullet2.setVisible(true);}    
jpb=0; jbullet0.setPosition(j0.getX()+12,j0.getY()+30);  jbullet1.setPosition(j1.getX()+12,j1.getY()+30);
jbullet2.setPosition(j2.getX()+12,j2.getY()+30);jbz=1;}
       break;
         case 3:
 if(jb[3]==1){jbz=0;     j0.setVisible(true);j1.setVisible(true);
j2.setVisible(true);j1.setFrame(2);
j0.setFrame(2);j2.setFrame(2);   j0.setPosition(200-aipp*50,planepoup-aipp*10);
j1.setPosition(100,planepoup);             j2.setPosition(100+aipp*50,planepoup-aipp*10); jb[3]=2; }
if (jb[3]==2){  j0.move(0,3);
j1.move(0,3);j2.move(0,3);
if(gzks==0){if(j1.getX()<c1.getX())
{j1.move(2,2);j1.setFrame(1);}
if(j1.getX()>c1.getX()){ j1.setFrame(0);
j1.move(-2,2);} if((j1.getX()<c1.getX())&&((j1.getX()+48)>c1.getX())&&(j1.getY()<c1.getY()))
 {j1.setFrame(2);j1.move(0,2); if(j1b==0){ jbullet1.setPosition(j1.getX()+12,j1.getY()+30);j1b=1;}}
 j0.move(0,3);jbullet1.move(0,3);
 j1.move(0,3);j2.move(0,3);} if((j2.getY()>(planepo+22))&&(j0.getY()>(planepo+22))&&((j1.getY()<(planepoup-22))||(j1.getY()>(planepo+22)))){
 jb[3]=1;
gz=0;gzks=0;jbullet1.setVisible(false);
jbullet2.setVisible(false);                     j0.setVisible(false);
     j1.setVisible(false);
     j2.setVisible(false);
  ai=aik.nextInt()%4; if(ai<0)
 ai=ai*(-1);
jb[ai]=1;   aipp=aip.nextInt()%5;
if(aipp==0) {aipp=aip.nextInt()%5;}
kkk=getHeight()/8;  }
if((j2.getX()<=c1.getX()-18)&(jbz==0))/
{ jpb=0; if(j0.isVisible())
{jbullet0.setVisible(true);}
if(j2.isVisible()){jbullet2.setVisible(true);
}jbullet0.setPosition(j0.getX()+12,j0.getY()+30);jbullet2.setPosition(j2.getX()+12,j2.getY()+30); jbz=1; }} break;}}if(jpb==0)
{jbullet0.move(0,5); jbullet1.move(0,5);
jbullet2.move(0,5); }
if((jbullet0.collidesWith(c1,true)||jbullet1.collidesWith(c1,true)||jbullet2.collidesWith(c1,true)||bossbullet0.collidesWith(c1,true)||bossbullet1.collidesWith(c1,true)||bossbullet2.collidesWith(c1,true))&&(pzbz==0)){
c1.setImage(img("/pic/explosion.png"),32,32); c1.setFrame(3); if((playerno>0))
{playerno=playerno-1; planert=1;
}else{pzbz=1; overcmd=1;  
over=1;}} if((j0.collidesWith(c1,true)&&(pzbz==0))) {
 c1.setImage(img("/pic/explosion.png"),32,32); c1.setFrame(3); if(playerno>0)
 {playerno=playerno-1; planert=1;
playlife=0; }else{overcmd=1; playlife=1;
over=1;} j0.setVisible(false); pzbz=1;
}if((j1.collidesWith(c1,true)&&(pzbz==0))) {c1.setImage(img("/pic/explosion.png"),32,32); c1.setFrame(3); if(playerno>0)
{playerno=playerno-1; planert=1;
playlife=0; }else{overcmd=1;  
playlife=1; over=1;} j1.setVisible(false);
pzbz=1; if((j2.collidesWith(c1,true)&&(pzbz==0))) 
{c1.setImage(img("/pic/explosion.png"),32,32); c1.setFrame(3);
if(playerno>0) {
playerno=playerno-1; planert=1;
playlife=0; }else{playlife=1;
if(overcmd==0) {}overcmd=1;
} over=1;} j2.setVisible(false);
pzbz=1; }if(overcmd==1)
{addCommand(new Command("返回",Command.OK,1)); overcmd=2;
if(boss==1) {cboss.setVisible(true);
if(cboss.getY()<25) {
      cboss.move(0,3);
    }else lr=1;
  if(lr==1)
  {if(cboss.getX()<0)
   {
    right=0;
 left=1;  }
 else if(cboss.getX()>getWidth()-cboss.getWidth())
{left=0; right=1; } 
if(right==0) {cboss.move(3,0); }
else if(left==0) {cboss.move(-3,0);} }
 if(((cboss.getX()<=c1.getX()-10)||(cboss.getX()<=c1.getX()+60))&&(jbsz==0))  {bossbullet0.setPosition(cboss.getX()+6,cboss.getY()+40); bossbullet1.setPosition(cboss.getX()+30,cboss.getY()+52);     bossbullet2.setPosition(cboss.getX()+54,cboss.getY()+40);  jbsz=1; }if(jbsz==1){
bossbullet0.setVisible(true);
bossbullet1.setVisible(true);
bossbullet2.setVisible(true);
bossbullet0.move(0,5);
bossbullet1.move(0,5);
bossbullet2.move(0,5); }
if(bossbullet2.getY()>getHeight()){jbsz=0;}}
if(bosslife==60){ cboss.setVisible(false);
j1.setVisible(false);j0.setVisible(false);
j2.setVisible(false);bossbullet0.setVisible(false);bossbullet1.setVisible(false);bossbullet2.setVisible(false);jbullet0.setVisible(false);jbullet1.setVisible(false);jbullet2.setVisible(false);
pzbz=1;bossover=1;boss=2;bosslife=65;
pzbzover=1; addCommand(new Command("返回",Command.OK,1));
  }if(bosslife==45)
 {bosscolor=1; }
 if(slife==65)
 {sbosscolor=1;}
 if(y1<0){ render(g);
y1=y1+1;planepoup=planepoup-1;
planepo=planepo-1;c1.move(0,-1); }
if (y1>=0 ) { if(boss==0)
{jbsz=0; boss=1; planepoup=0;
planepo=getHeight();cboss.setPosition(80,-60); }renderboss(g); } if(bosscolor==0)
cboss.setFrame(0); else cboss.setFrame(1);
if(sbosscolor==0) sboss.setFrame(0);
else sboss.setFrame(1); if(cloundno==0)
{   cloud[0].setPosition(25,planepoup-(65));
 cloud[1].setPosition(80,planepoup-(140);
  cloud[2].setPosition(112,planepoup-(90));        cloud[3].setPosition(175,planepoup-(200)); cloud[4].setPosition(223,planepoup-(70));
cloundno=1; } cloud[0].move(0,1);
cloud[1].move(0,1); cloud[2].move(0,1);
      cloud[3].move(0,1);
      cloud[4].move(0,1);
          if(cloud[0].getY()>planepo){
cloudposition=aicloud.nextInt()%5;
if(cloudposition<0) {        cloudposition=cloudposition*(-1);
 } cloudposition=cloudposition+1;
 cloud[0].setPosition(cloudposition*40,planepoup);  }if(cloud[1].getY()>planepo){
 cloudposition=aicloud.nextInt()%5;
if(cloudposition<0) { cloudposition=cloudposition*(-1);
} cloudposition=cloudposition+1;
cloud[1].setPosition(cloudposition*30,planepoup); }if(cloud[2].getY()>planepo){
cloudposition=aicloud.nextInt()%5;
if(cloudposition<0) {coudposition=cloudposition*(-1); }
 cloudposition=cloudposition+1;
 cloud[2].setPosition(cloudposition*55,planepoup); }if(cloud[3].getY()>planepo){
cloudposition=aicloud.nextInt()%5;
if(cloudposition<0) {cloudposition=cloudposition*(-1);
}cloudposition=cloudposition+1;
cloud[03].setPosition(cloudposition*15,planepoup); } if(cloud[4].getY()>planepo){
cloudposition=aicloud.nextInt()%5;
if(cloudposition<0) {cloudposition=cloudposition*(-1); }
cloudposition=cloudposition+1; cloud[4].setPosition(cloudposition*22,planepoup); }if((y1==-1000)&&(sbz==0))
{sbsz0=0; sbsz1=0; sbsz2=0; sbsz3=0;
drawslife=1; sboss.setVisible(true);
sboss.setPosition(50,planepoup-65);
sbz=1; }if(sbz==1) {sboss.move(0,3);
if(sboss.getY()>planepoup) {sbz=2;
}}
if(sbz==2) {if(((sboss.getY()-50)<c1.getY())&&(smovebz==0)) { sbmove=1;//上移}
if(((sboss.getX()+30)<c1.getX())&&(smovebz==0)) {sbmove=4;//右移}
if(((sboss.getY()+50)<c1.getY())&&(smovebz==0)) {sbmove=2; }
if(((sboss.getX()-30)>c1.getX())&&(smovebz==0)) {sbmove=3; }if(sbmove==1)//上移
{ smovebz=1; sboss.move(0,-2); }
if(sbmove==2){smovebz=1; sboss.move(0,2);
}if(sbmove==3) {sboss.move(-2,0); }
if(sbmove==4)
{smovebz=1; sboss.move(2,0); }
if(sboss.getY()<planepoup) {
 sboss.setPosition(sboss.getX(),planepoup);  smovebz=0; }
if(sboss.getY()>(planepo-65)){       sboss.setPosition(sboss.getX(),planepo-65);
smovebz=0; }if(sboss.getX()<0) {sboss.setPosition(0,sboss.getY());smovebz=0; }if(sboss.getX()>(getWidth()-65)) { sboss.setPosition(getWidth()-65,sboss.getY()); smovebz=0; } if(((sboss.getX()+40)<c1.getX())&&(sboss.getY()<c1.getY())&&((sboss.getY()+65)>c1.get

 << 上一页  [11] [12] [13] [14] [15] [16] [17] 下一页

java手机游戏设计源代码 第14页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。