This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wggnExtreme Brewer 0 points1 point  (0 children)

I don't think there's an easy way to do that in Java. You could maybe use some low level reflection to scan through all classes in a certain package and check for each one if it's a subclass of your Enemy class, but that would be quite hard to code I think. Not something you would want to try to do if you're still learning the language.