Better way to generate enemies of different sub-classes
- by KDiTraglia
So lets pretend I have an enemy class that has some generic implementation and inheriting from it I have all the specific enemies of my game. There are points in my code that I need to check whether an enemy is a specific type, but in Java I have found no easier way than this monstrosity...
//Must be a better way to do this
if (…