public RuinEntityConfig(XElement element) { string name = element.GetAttributeString("prefab", ""); Prefab = MapEntityPrefab.Find(name: null, identifier: name); if (Prefab == null) { DebugConsole.ThrowError("Loading ruin entity config failed - map entity prefab \"" + name + "\" not found."); return; } SerializableProperties = SerializableProperty.DeserializeProperties(this, element); int gIndex = 0; LoadChildren(element, ref gIndex); void LoadChildren(XElement element2, ref int groupIndex) { foreach (XElement subElement in element2.Elements()) { switch (subElement.Name.ToString().ToLowerInvariant()) { case "connection": case "entityconnection": EntityConnections.Add(new EntityConnection(subElement)); break; case "chooseone": groupIndex++; LoadChildren(subElement, ref groupIndex); break; default: childEntities.Add(new RuinEntityConfig(subElement) { SingleGroupIndex = groupIndex }); break; } } } }
public ApalisInvoiceContext(EntityConnections entityConnections) { this.entityConnections = entityConnections; }