The target must initialize the superclass using one of its constructors. If there is a default constructor (without a parameter), then the compiler calls it implicitly, otherwise the subclass constructor must call it, using super as the first line of its constructor.
In your case, it will be:
public Beam(float x, float y, float shiftX, float shiftY, int beamMode) { super(x, y)
And delete the assignments this.x and this.y later.
Also, avoid creating protected , which makes debugging difficult. Add getters and, if necessary, setters
source share