private static void ParseXMLObject(XmlNode xmlObject, ICollisionHandler collisionHandler) { ObjectType object1Type = (ObjectType)Enum.Parse(typeof(ObjectType), xmlObject["object1"].FirstChild.Value); ObjectType object2Type = (ObjectType)Enum.Parse(typeof(ObjectType), xmlObject["object2"].FirstChild.Value); Object2Side side = (Object2Side)Enum.Parse(typeof(Object2Side), xmlObject["side"].FirstChild.Value); ICollisionCommand command = commandDictionary[xmlObject["command"].FirstChild.Value]; collisionHandler.RegisterCommand(new Tuple <ObjectType, ObjectType, Object2Side>(object1Type, object2Type, side), command); }