Вопрос

I just wonder what do I hardcode in my game? E.g do I have an external file for every Enemy properties so on or do I make a class?

So what info/stuff should I code and what should I have as a .file?

Cheers!

Это было полезно?

Решение

Make a properties file, and instantiate a bean when you need that type of property. There aren't many good reasons to hardcode things. At the very least, make the hardcoded items into constants: public static final int XYZZY = 0;

That being said, I'll hardcode to get something working or for prototyping. Then I'll go back and generalize it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top