Esempio n. 1
0
 public PedComponent this[PedComponentType componentId]
 {
     get
     {
         if (!_pedComponents.TryGetValue(componentId, out PedComponent variation))
         {
             variation = new PedComponent(_ped, componentId);
             _pedComponents.Add(componentId, variation);
         }
         return(variation);
     }
 }
 public PedComponent this[PedComponents componentId]
 {
     get
     {
         PedComponent component = null;
         if (!this._pedComponents.TryGetValue(componentId, out component))
         {
             component = new PedComponent(this._ped, componentId);
             this._pedComponents.Add(componentId, component);
         }
         return(component);
     }
 }
Esempio n. 3
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());
        }
        public PedComponent[] GetAllComponents()
        {
            List <PedComponent> list = new List <PedComponent>();

            foreach (PedComponents components in Enum.GetValues(typeof(PedComponents)))
            {
                PedComponent item = this[components];
                if (item.HasAnyVariations)
                {
                    list.Add(item);
                }
            }
            return(list.ToArray());
        }