ITraitInfo, plumbing in NewUnitInfo

This commit is contained in:
Chris Forbes
2010-01-10 12:34:17 +13:00
parent fe8b13591f
commit 5fb2f91281
8 changed files with 44 additions and 12 deletions

View File

@@ -16,6 +16,15 @@ namespace OpenRa.Game.GameRules
}
}
public static void Load(object self, MiniYaml my)
{
foreach (var x in my.Nodes)
{
var field = self.GetType().GetField(x.Key.Trim());
field.SetValue(self, GetValue(field.FieldType, x.Value.Value.Trim()));
}
}
public static void CheckYaml( object self, Dictionary<string, MiniYaml> d )
{
//foreach( var x in d )