wingplanecommand.java
来自「J2ME飞机设计游戏,希望对学习J2ME的程序员有所帮助」· Java 代码 · 共 32 行
JAVA
32 行
public class WingPlaneCommand implements Command {
public WingPlaneCommand() {
world = World.getInstance();
planeActor = BattlePlaneActor.getInstance();
xSpeed = Tool.getXSpeedByAngel(45, 7);
ySpeed = Tool.getYSPeedByAngel(45, 7);
}
public void execute(int xPos, int yPos) {
if (planeActor.getBattle_magic() >= 70) {
world.setBombTimes(5);
world.newBullet(13, -109 << 8, 184 << 8, xSpeed, ySpeed);
world.newBullet(13, -67 << 8, 191 << 8, xSpeed, ySpeed);
world.newBullet(13, -25 << 8, 208 << 8, xSpeed, ySpeed);
world.newBullet(13, -13 << 8, 250 << 8, xSpeed, ySpeed);
world.newBullet(13, 1 << 8, 292 << 8, xSpeed, ySpeed);
//planeActor.setBattle_magic(planeActor.getBattle_magic() - 70); // 消耗魔法值
}
}
private int xSpeed;
private int ySpeed;
private World world;
private BattlePlaneActor planeActor;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?