So I dig into it. Since I'm serializing the levels through the editor instead of writing a line in a text file for the level, I can just pull grab the object. I recreated the code that creates a trigger and took a look at it. 9 lines total. Curious, I looked at the original code. 105 lines with a helper function that is another 20 lines. This makes the code much easier to use, and much easier to modify. In the future, I'm just going to use xml serialization instead of trying to read in the text and determining what goes where and what changes have been made that breaks other things.
Currently the LoadLevel code is 555 lines long. Excited to see how much smaller I can make that!
No comments:
Post a Comment