So I have two arrays,
Array<GroundEnemy> groundEnemies;
Array<FlyingEnemy> flyingEnemies;
Then I have the methods to render enemies as,
renderGroundEnemy(groundEnemies, delta);
renderFlyingEnemy(flyingEnemies, delta);
and I declared these methods as,
private void renderGroundEnemy(GroundEnemy enemies, delta){ ... }
private void renderFlyingEnemy(FlyingEnemy enemies, delta){ ... }
Because the method for rendering flying enemies is the same for rendering ground enemies I thought I would just reuse the same method. Now I'm confused how to set the argument type for the method. How do I set the argument type for the render method? I was thinking something like this but I still don't quite get it,
private void renderEnemy(ArrayOfObjects enemies, delta){ ... }