コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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());
        }