All right, thank you very much for responding everybody :-)
If i try to summarize your findings, i come to the following conclusions:
- If the behaviour of all the different enemies is the same, the best way to code everything is one of the following:
- Pass the type to the constructor, then use a switch statement in the constructor to set the different values
- Pass the different values directly to the constructor
When considering these methods i prefer the first one, since it will allow me to create new enemies easier. An even more advanced approach would be to dynamically generate the enemies by loading them from an external data file.
- If the behaviour of the enemies is different, composition is the best option. This is something new to me (i am not yet very experienced) but something i will definitely look into.
I hope the above is correct. Thank you very much for all your replies.