문제

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