3 ms·
Yes, if you determine that creating your objects requires passing in state or using some logic that you don't want to put in the constructor, then using a facto
by bogdanoff_2 7y ago
Yes, if you determine that creating your objects requires passing in state or using some logic that you don't want to put in the constructor, then using a factory or factory function makes sense. However that has nothing to do with creating a dynamic number of enemies.
Object pooling is a good point actually.