private List<object> CollectionToDataProvider(Collection collection) { var dataProvider = new List<object>(); foreach (var outfit in collection) { Outfit TmpOutfit = new Outfit(ContentManager.GetResourceFromLongID( outfit.PurchasableOutfit.OutfitID)); Appearance TmpAppearance = new Appearance(ContentManager.GetResourceFromLongID( TmpOutfit.GetAppearance(AppearanceType))); ulong thumbID = TmpAppearance.ThumbnailID; dataProvider.Add(new UIGridViewerItem { Data = outfit, Thumb = new TSOClient.Code.Utils.Promise<Texture2D>(x => GetTexture(thumbID)) }); } return dataProvider; }
public static void LoadSim3D(Sim sim, Outfit OutfHead, AppearanceType skin) { var Apr = new Appearance(ContentManager.GetResourceFromLongID(OutfHead.GetAppearance(skin))); var Bnd = new Binding(ContentManager.GetResourceFromLongID(Apr.BindingIDs[0])); sim.HeadTexture = GetOutfitTexture(Bnd.TextureAssetID); sim.HeadMesh = GetOutfitMesh(sim.SimSkeleton, Bnd.MeshAssetID); }