comp380team3 / PuzzlePathDimension

Class project for COMP 380 at California State University, Northridge
0 stars 0 forks source link

Create serializable LevelGroup model #91

Closed Twisol closed 11 years ago

Twisol commented 11 years ago

The LevelGroup shall contain an ordered list of level names and paths, so that level prerequisites can be determined and the levels can be easily shown in menus.

Example XML:

<Levels>
  <Level path="TestLevel.xml" name="This is a Test" />
  <Level path="Level1.xml" name="Red Pill" />
  <Level path="YouWin.xml" name="You Win!" />
</Levels>
Jjp137 commented 11 years ago

Just noting that I'm starting to get this whole serialization thingy :p but everything is on one line for some reason...

Twisol commented 11 years ago

There's an option to the XmlSerializer, I believe, that lets you tell it how to format the output.

Jjp137 commented 11 years ago

Ah okay; I'll look into that.

Twisol commented 11 years ago

Here's a related StackOverflow question: http://stackoverflow.com/questions/5414617/prevent-xmlserializer-from-formatting-output

It's totally backwards, obviously (they want to suppress formatting), but it might help.

Jjp137 commented 11 years ago

I got it to format with indenting and such :) Now I just have to get it to have an entry for every level, which shouldn't be hard.