-
-
Notifications
You must be signed in to change notification settings - Fork 556
Annotations Metaprogramming
Almas Baimagambetov edited this page May 8, 2017
·
5 revisions
Classes annotated with @AddCollisionHandler
are automatically registered as collision handlers.
@AddCollisionHandler
class PlayerPowerupHandler extends CollisionHandler {
...
}
The class annotated with @SetEntityFactory
is set as the main entity factory.
@SetEntityFactory
class MyEntityFactory implements EntityFactory {
}
Indicates that a method is called when user triggers an action.
The method signature must be public void anyName()
.
@OnUserAction(name = "Move Left")
public void moveLeft() {
...
}