October 21, 20169 yr Override is needed because those methods are abstract methods in the Script class. The override annotation is entirely optional. The runnable scripts inherit Script class, without override when onStart/onLoop/etc. is called from the super class it is not able to be called in the inherited class because the abstract method wasn't overriden. Wrong. All the override annotation does is bring more clarity to your code and add a compile-time check that verifies whether the annotated method is actually overriding. But the method will still be overridden, even if it's not there
Create an account or sign in to comment