Lets say i have a base class Entity with variables for position.
public class Entity {
private int position;
}
Now i want a classes that have variables for speed, health, damage and any combination of those. like:
public class MovingAndHealth extends Entity {
private int speed;
private int health;
}
Is there a way to do this or do i have to make all variations manually?