Hey,
I need a code so I can save this class. The problem is that it cant be done with XML-serialazation because it as initial arrays. [Attribute(50,50), Tile(50,50) etc.)
How will I save/load this class with initial arrays?
thanks
I need a code so I can save this class. The problem is that it cant be done with XML-serialazation because it as initial arrays. [Attribute(50,50), Tile(50,50) etc.)
How will I save/load this class with initial arrays?
Code:
Public Class Map
Public Attribute(50, 50) As AttributeRec
Public Tile(50, 50) As LayerRec
Public Npc(50) As MapNpcRec
Public Item(50) As MapItemRec
Public Structure MapItemRec
Public X As Integer
Public Y As Integer
Public ItemID As Integer
Public ItemAmmount As Integer
End Structure
Public Structure MapNpcRec
Public SpawnX As Integer
Public SpawnY As Integer
Public X As Integer
Public Y As Integer
Public NpcID As Integer
End Structure
Public Structure LayerRec
Public Ground As TileRec
Public Mask As TileRec
Public Mask2 As TileRec
Public Fringe As TileRec
Public Fringe2 As TileRec
End Structure
Public Structure TileRec
Public imgX As Integer
Public imgY As Integer
Public Tileset As Integer
End Structure
Public Structure AttributeRec
Public Attribute As Integer
Public Value As Integer
End Structure
End Class