• 大小: 4.87MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-05
  • 语言: Java
  • 标签: java  超级玛丽  

资源简介

这是java版的超级玛丽,内有源代码。也有许多不足之处,拿来与大家分享一下。

资源截图

代码片段和文件信息

package org.liky.mario;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
public class BackGround {

private BufferedImage bgImage=null;
private int sort;
public boolean isDown() {
return isDown;
}

public void setDown(boolean isDown) {
this.isDown = isDown;
}

private boolean flag;

public boolean isOver() {
return isOver;
}

public void setOver(boolean isOver) {
this.isOver = isOver;
}

private boolean isOver=false;
private boolean isDown=false;
private List allEnemy = new ArrayList();
private List allObstruction=new ArrayList();
private List removedEnemy=new ArrayList();
private List removedObstruction =new ArrayList();

public BackGround(int sortboolean flag){
this.sort=sort;
this.flag=flag;
if(flag){
bgImage=StaticValue.endImage;
}else{
bgImage=StaticValue.bgImage;
}
if(sort==1){
for(int i=0;i<15;i++){
this.allObstruction.add(new Obstruction(i*605409this));
}
this.allObstruction.add(new Obstruction(1203604this));
this.allObstruction.add(new Obstruction(3003600this));
this.allObstruction.add(new Obstruction(3603604this));
this.allObstruction.add(new Obstruction(4203600this));
this.allObstruction.add(new Obstruction(4803604this));
this.allObstruction.add(new Obstruction(5403600this));
this.allObstruction.add(new Obstruction(4201804this));
this.allObstruction.add(new Obstruction(6605406this));
this.allObstruction.add(new Obstruction(7205405this));
this.allObstruction.add(new Obstruction(6604808this));
this.allObstruction.add(new Obstruction(7204807this));
this.allEnemy.add(new Enemy(600480true1this));
this.allEnemy.add(new Enemy(690540true2420510this));
this.allObstruction.add(new Obstruction(6603003this));
}
if(sort==2){
for(int i=0;i<15;i++){
if(i!=10){
this.allObstruction.add(new Obstruction(i*605409this));
}
}
this.allObstruction.add(new Obstruction(605406this));
this.allObstruction.add(new Obstruction(1205405this));
this.allObstruction.add(new Obstruction(604806this));
this.allObstruction.add(new Obstruction(1204805this));
this.allObstruction.add(new Obstruction(604208this));
this.allObstruction.add(new Obstruction(1204207this));

this.allObstruction.add(new Obstruction(2405406this));
this.allObstruction.add(new Obstruction(3005405this));
this.allObstruction.add(new Obstruction(2404806this));
this.allObstruction.add(new Obstruction(3004805this));
this.allObstruction.add(new Obstruction(2404206this));
this.allObstruction.add(new Obstruction(3004205this));
this.allObstruction.add(new Obstruction(2403608this));
this.allObstruction.add(new Obstruction(3003607this)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-07-18 20:12  Mario\
     文件         301  2011-05-06 16:26  Mario\.classpath
     文件         381  2011-05-06 16:26  Mario\.project
     目录           0  2012-07-18 20:12  Mario\.settings\
     文件         629  2011-05-06 16:26  Mario\.settings\org.eclipse.jdt.core.prefs
     目录           0  2012-07-18 20:12  Mario\bin\
     文件        2542  2011-05-06 17:41  Mario\bin\1.gif
     文件        2527  2011-05-06 17:41  Mario\bin\10.gif
     文件        2606  2011-05-06 17:41  Mario\bin\2.gif
     文件        2542  2011-05-06 17:41  Mario\bin\3.gif
     文件        2638  2011-05-06 17:41  Mario\bin\4.gif
     文件        2553  2011-05-06 17:41  Mario\bin\5.gif
     文件        2454  2011-05-06 17:41  Mario\bin\6.gif
     文件        2587  2011-05-06 17:41  Mario\bin\7.gif
     文件        2532  2011-05-06 17:41  Mario\bin\8.gif
     文件        2632  2011-05-06 17:41  Mario\bin\9.gif
     文件       55468  2011-05-06 17:41  Mario\bin\firststage.jpg
     文件      225383  2011-05-15 17:42  Mario\bin\firststageend.jpg
     文件        2984  2011-05-06 17:41  Mario\bin\flower1.gif
     文件        3237  2011-05-06 17:41  Mario\bin\flower2.gif
     文件     2230647  2011-05-06 17:41  Mario\bin\mario.mp3
     文件         867  2011-05-06 17:41  Mario\bin\ob1.gif
     文件         466  2011-05-06 17:41  Mario\bin\ob10.gif
     文件         324  2011-05-06 17:41  Mario\bin\ob11.gif
     文件         408  2011-05-06 17:41  Mario\bin\ob12.gif
     文件        2832  2011-05-06 17:41  Mario\bin\ob2.gif
     文件        2463  2011-05-06 17:41  Mario\bin\ob3.gif
     文件         901  2011-05-06 17:41  Mario\bin\ob4.gif
     文件        7621  2011-05-06 17:41  Mario\bin\ob5.gif
     文件         888  2011-05-06 17:41  Mario\bin\ob6.gif
     文件        1423  2011-05-06 17:41  Mario\bin\ob7.gif
............此处省略68个文件信息

评论

共有 条评论