Airplane
package com.cetc.shoot;
//敌机
//是飞行物也是敌人
public class Airplane extends Fiyingobject implements Enemy{
private int speed =2;//你所走的步数起步:2
//重构构造方法
public Airplane() {
image = ShootGame.airplane;//图
width = image.getWidth();//宽
height=image.getHeight();//高
x = (int)(Math.random()*(ShootGame.WIDTH-this.width));
y = -this.height;//y:负的敌机的高
x=100;
y=200;
}
public int getScore()
Flyingobject四子类实现重写构造方法
最新推荐文章于 2024-02-29 10:30:00 发布