Jump to content

My node class! everything looks clean but not start -_-


Recommended Posts

Posted

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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...