I have been looking over this doc:
And it indicates that there is an onUpdate, but I’m seeing this error when I try to use it:
The method onUpdate(float) from the type new
SequenceEntityModifier(){} is never used locally
I’m new to Java, here is my code:
SequenceEntityModifier modifier = new SequenceEntityModifier(myMovemod) {
@Override
protected void onModifierFinished(IEntity pItem) {
// animation finished
super.onModifierFinished(pItem);
}
protected float onUpdate(float pSecondsElapsed) {
return pSecondsElapsed;
}
};
When I add “@Override” to it, I get an error, and eclipse’s only solution is to remove @override, What am I doing wrong here?
Based on the javadoc in your original question, I think the method should look like:
Otherwise you are not overriding an existing method – you are creating a new method.
Also
onModifierFinishedshould be public.