39 lines
1.0 KiB
Java
39 lines
1.0 KiB
Java
import java.awt.*;
|
|
import java.util.function.Supplier;
|
|
|
|
public class EntityAirFighter {
|
|
private int speed;
|
|
public int getSpeed(){
|
|
return speed;
|
|
}
|
|
private double weight;
|
|
public double getWeight(){
|
|
return weight;
|
|
}
|
|
private Color bodyColor;
|
|
public Color getBodyColor(){
|
|
return bodyColor;
|
|
}
|
|
private Color additionalColor;
|
|
public Color getAdditionalColor(){
|
|
return additionalColor;
|
|
}
|
|
private boolean isWings;
|
|
public boolean getWings() {
|
|
return isWings;
|
|
}
|
|
private boolean isRockets;
|
|
public boolean getRockets() {
|
|
return isRockets;
|
|
}
|
|
public Supplier<Double> step = () -> (double) speed * 100 / weight;
|
|
public void init(int speed, double weight, Color bodyColor, Color
|
|
additionalColor, boolean isWings, boolean isRockets) {
|
|
this.speed = speed;
|
|
this.weight = weight;
|
|
this.bodyColor = bodyColor;
|
|
this.additionalColor = additionalColor;
|
|
this.isWings = isWings;
|
|
this.isRockets = isRockets;
|
|
}
|
|
} |