资源简介
一款基于JAVA的桌面宠物,里面图片资源什么的已经有了,导入Eclipse中就可以用。中间可能还有点bug,希望下载的客官可以提出,以待改进。(有了发送邮件的功能,但好像忘记添加进去了)

代码片段和文件信息
package animation;
import javax.swing.Jframe;
import desk_fairy.EnvironmentEnum;
public class Action {
protected int[] velocityX;
protected int[] velocityY;
protected float accelerationX = 0;
protected float accelerationY = 0;
protected long HZ = 30;
protected int times;
protected int[] num;
protected String[] imageURL;
protected boolean imageMod;
protected boolean accBool = false;
public Action() {
}
public static Action getAction(EnvironmentEnum enviEnum boolean dic) {
int ran = (int)(Math.random()*600);
int temp;
switch(enviEnum) {
case GROUND:
temp = ran % 12;
if(temp == 0 || temp == 3 || temp == 6 || temp == 9) {
System.out.println(“ground walk“);
return new ActionWalk();
} else if(temp == 1 || temp == 4) {
System.out.println(“ground sit“);
return new ActionSit();
} else if(temp == 2 || temp == 5 || temp == 7) {
System.out.println(“ground stop“);
return new ActionGroundStop();
} else if(temp == 11 || temp == 10 || temp == 8) {
System.out.println(“ground run“);
return new ActionRun();
}
case WALL:
temp = ran % 9;
if(temp == 0 || temp == 2 || temp == 4 || temp == 6 || temp == 8) {
System.out.println(“wall up“);
return new ActionUp(dic);
} else if(temp == 1 || temp == 5 || temp == 7) {
System.out.println(“wall stop“);
return new ActionWallStop(dic);
} else if(temp == 3) {
System.out.println(“wall jump“);
return new ActionWallJump(dic);
}
case TOP:
temp = ran % 9;
if(temp == 0 || temp == 5 || temp == 8) {
System.out.println(“top walk“);
return new ActionTopWalk(dic);
} else if(temp == 1 || temp == 4 || temp == 7 || temp == 2) {
System.out.println(“top biu“);
return new ActionTopBiu(dic);
} else if(temp == 3 || temp == 6) {
System.out.println(“top stop“);
return new ActionTopStop(dic);
}
case AIR:
System.out.println(“air“);
return new ActionAir(dic);
}
return null;
}
public static Action getAction(int a) {
switch(a) {
case 1:
return new ActionWalk();
case 2:
return new ActionSit();
case 3:
return new ActionGroundStop();
case 4:
return new ActionRun();
default:
return null;
}
}
public static Action getAction(EnvironmentEnum enviEnumNow EnvironmentEnum enviEnumBefore boolean dic) {
if(enviEnumNow == EnvironmentEnum.GROUND && enviEnumBefore == EnvironmentEnum.AIR) {
return new ActionFall(dic);
} else {
return Action.getAction(enviEnumNow dic);
}
// else if (enviEnumNow == EnvironmentEnum.WALL && enviEnumBefore == EnvironmentEnum.GROUND) {
// return Action.getAction(enviEnumNow dic);
// } else if(enviEnumNow == EnvironmentEnum.TOP && enviEnumBefore == EnvironmentEnum.WALL) {
// return Action.getAction(enviEnumNow dic);
// }
}
/**
*
* @param x 索引值
* @return 返回X轴速度
*/
public int getVelocityX(in
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-10-23 21:42 DeskFairy\
文件 453 2016-10-23 21:43 DeskFairy\.classpath
文件 385 2016-10-12 21:01 DeskFairy\.project
目录 0 2016-10-12 21:01 DeskFairy\.settings\
文件 598 2016-10-12 21:01 DeskFairy\.settings\org.eclipse.jdt.core.prefs
目录 0 2017-03-10 16:13 DeskFairy\bin\
目录 0 2017-03-10 16:13 DeskFairy\bin\animation\
文件 4440 2017-03-10 16:13 DeskFairy\bin\animation\Action.class
文件 577 2017-03-10 16:13 DeskFairy\bin\animation\ActionAir.class
文件 653 2017-03-10 16:13 DeskFairy\bin\animation\ActionFall.class
文件 731 2017-03-10 16:13 DeskFairy\bin\animation\ActionGroundStop.class
文件 851 2017-03-10 16:13 DeskFairy\bin\animation\ActionRun.class
文件 711 2017-03-10 16:13 DeskFairy\bin\animation\ActionSit.class
文件 594 2017-03-10 16:13 DeskFairy\bin\animation\ActionTopBiu.class
文件 696 2017-03-10 16:13 DeskFairy\bin\animation\ActionTopStop.class
文件 937 2017-03-10 16:13 DeskFairy\bin\animation\ActionTopWalk.class
文件 892 2017-03-10 16:13 DeskFairy\bin\animation\ActionUp.class
文件 858 2017-03-10 16:13 DeskFairy\bin\animation\ActionWalk.class
文件 952 2017-03-10 16:13 DeskFairy\bin\animation\ActionWallJump.class
文件 733 2017-03-10 16:13 DeskFairy\bin\animation\ActionWallStop.class
目录 0 2017-03-10 16:13 DeskFairy\bin\desk_fairy\
文件 1488 2017-03-10 16:13 DeskFairy\bin\desk_fairy\Environment.class
文件 1192 2017-03-10 16:13 DeskFairy\bin\desk_fairy\EnvironmentEnum.class
文件 2596 2017-03-10 16:13 DeskFairy\bin\desk_fairy\IrregularFormSample$1.class
文件 1155 2017-03-10 16:13 DeskFairy\bin\desk_fairy\IrregularFormSample$2.class
文件 842 2017-03-10 16:13 DeskFairy\bin\desk_fairy\IrregularFormSample$3.class
文件 779 2017-03-10 16:13 DeskFairy\bin\desk_fairy\IrregularFormSample$4.class
文件 10054 2017-03-10 16:13 DeskFairy\bin\desk_fairy\IrregularFormSample.class
目录 0 2017-03-10 16:13 DeskFairy\bin\email\
文件 266 2017-03-10 16:13 DeskFairy\bin\email\Mailfr
文件 751 2017-03-10 16:13 DeskFairy\bin\email\SendMail$1.class
............此处省略83个文件信息
- 上一篇:java图书管理系统毕业论文95235
- 下一篇:纯JSP学生成绩管理
相关资源
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
- [免费]java实现有障碍物的贪吃蛇游戏
评论
共有 条评论