24 lines
582 B
Java
Raw Normal View History

2023-11-04 02:04:16 +04:00
import java.awt.*;
import java.util.function.Supplier;
2023-11-04 02:32:04 +04:00
2023-11-04 02:04:16 +04:00
public class EntityBus {
private int speed;
public int getSpeed() {
return speed;
}
private double weight;
public double getWeight() {
return weight;
}
2023-12-07 20:36:56 +04:00
public Color bodyColor;
2023-11-04 02:04:16 +04:00
public Color getBodyColor() {
return bodyColor;
}
public Supplier<Double> step = () -> (double) speed * 100 / weight;
public EntityBus(int speed, double weight, Color bodyColor) {
this.speed = speed;
this.weight = weight;
this.bodyColor = bodyColor;
}
2023-12-07 20:36:56 +04:00
}