// inicializar una instancia public TopButtonViewModel(ClothingItemBase.ClothingType type, ClothingItemBase.MaleFemaleType maleFemaleType, string pathToModel) : base(type, maleFemaleType, pathToModel) { Ratio = 1.2; DeltaY = 0.95; }
// agregamos un item de ropa // categoria del item, path del modelo , scala de ratio, posicion public void AddClothingItem <T>(ClothingItemBase.ClothingType category, string modelPath, double ratio, double deltaY) { OrderedDictionary <ClothingItemBase.ClothingType, ClothingItemBase> tmpModels = ChosenClothesModels; tmpModels[category] = (ClothingItemBase)Activator.CreateInstance(typeof(T), _importer.Load(modelPath), ratio, deltaY); ChosenClothesModels = new OrderedDictionary <ClothingItemBase.ClothingType, ClothingItemBase>(tmpModels); }
//inicializacion de instancia protected ClothingButtonViewModel(ClothingItemBase.ClothingType category, ClothingItemBase.MaleFemaleType type, string pathToModel) { _category = category; _type = type; ModelPath = pathToModel; }
/// <summary> /// Initializes a new instance of the <see cref="HatButtonViewModel"/> class. /// </summary> /// <param name="type">The type of the clothing.</param> /// <param name="pathToModel">The path to model.</param> public HatButtonViewModel(ClothingItemBase.ClothingType type, string pathToModel) : base(type, ClothingItemBase.MaleFemaleType.Male, pathToModel) { Ratio = 0.8; DeltaY = 1.2; }
// inicializar una instancia public TieButtonViewModel(ClothingItemBase.ClothingType type, string pathToModel) : base(type, ClothingItemBase.MaleFemaleType.Male, pathToModel) { Ratio = 1; DeltaY = 1.05; }
/// <summary> /// Initializes a new instance of the <see cref="GlassesButtonViewModel"/> class. /// </summary> /// <param name="type">The type of the clothing.</param> /// <param name="pathToModel">The path to model.</param> public GlassesButtonViewModel(ClothingItemBase.ClothingType type, string pathToModel) : base(type, ClothingItemBase.MaleFemaleType.Both, pathToModel) { Ratio = 0.3; DeltaY = 1.2; }
/// <summary> /// Initializes a new instance of the <see cref="ClothingButtonViewModel"/> class. /// </summary> /// <param name="category">Clothing category</param> /// <param name="type">Male or female type of clothing</param> /// <param name="pathToModel">Path to the model</param> protected ClothingButtonViewModel(ClothingItemBase.ClothingType category, ClothingItemBase.MaleFemaleType type, string pathToModel) { _category = category; _type = type; ModelPath = pathToModel; }