Skip to content

Instantly share code, notes, and snippets.

@wmiller
Created February 4, 2014 13:55
Show Gist options
  • Save wmiller/8803961 to your computer and use it in GitHub Desktop.
Save wmiller/8803961 to your computer and use it in GitHub Desktop.
XML Database part 2 Infos.cs
using UnityEngine;
using System.Collections;
using System.Xml;
using System.Xml.Serialization;
[XmlRoot]
public sealed class TileInfo : DatabaseEntry
{
[XmlElement]
public int Height { get; private set; }
[XmlElement]
public int FeatureChance { get; private set; }
[XmlElement]
public DatabaseEntryRef<AssetInfo> PrefabInfoRef { get; private set; }
[XmlArray("PossibleFeatures")]
[XmlArrayItem("FeatureInfoRef")]
public DatabaseEntryRef<FeatureInfo>[] PossibleFeatures { get; private set; }
}
[XmlRoot]
public sealed class FeatureInfo : DatabaseEntry
{
[XmlElement]
public DatabaseEntryRef<AssetInfo> PrefabInfoRef { get; private set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment