Hi! So I'm currently working on my first game in java, and I'm trying to create a basic mob spawner in it
What I have done so far, is that I created a If statement, in the Enemy class I made, that uses a Random number generator to check if it should spawn something (Im considering making it time based, since I want the game to get progressively harder).
The problem is that for every mob it's supposed to create, I have to manually make a different object for it (Ex Enemy1, Enemy2....), which makes it really time consuming (and probably very CPU consuming).
That's why I wondered if there is some other way to do this? Maybe storing them in arrays or something if thats possible Thanks in advance
What I have done so far, is that I created a If statement, in the Enemy class I made, that uses a Random number generator to check if it should spawn something (Im considering making it time based, since I want the game to get progressively harder).
The problem is that for every mob it's supposed to create, I have to manually make a different object for it (Ex Enemy1, Enemy2....), which makes it really time consuming (and probably very CPU consuming).
That's why I wondered if there is some other way to do this? Maybe storing them in arrays or something if thats possible Thanks in advance