public PedComponent this[PedComponents componentId] { get { PedComponent variation = null; if (!_pedComponents.TryGetValue(componentId, out variation)) { variation = new PedComponent(_ped, componentId); _pedComponents.Add(componentId, variation); } return(variation); } }
public PedComponent[] GetAllComponents() { List <PedComponent> components = new List <PedComponent>(); foreach (PedComponents componentId in Enum.GetValues(typeof(PedComponents))) { PedComponent component = this[componentId]; if (component.HasAnyVariations) { components.Add(component); } } return(components.ToArray()); }