public void Init(CustomizerAvatarController customizerAvatarController, Texture2D[] defaultSwatchTextures, string categoryToSelect) { itemCustomizationModel = new DItemCustomization(); itemCustomizationModel.SetDefaultTextures(defaultSwatchTextures); ClothingDesignerOutliner component = customizerAvatarController.GetComponent <ClothingDesignerOutliner>(); propertyCustomizationController.SetOutliner(component); mainModel = new CustomizerModel(itemCustomizationModel); propertyCustomizationController.SetModel(mainModel); customizerAvatarController.SetModel(mainModel); templateSelectionController.SetModel(itemCustomizationModel); templateChosenController.SetModel(itemCustomizationModel); if (mode == CustomizerMode.CLOTHING) { equipmentCustomizationController.SetDependancies(templateSelectionController, templateChosenController, propertyCustomizationController, mainModel); EventBus.DispatchEvent(new CustomizerActiveSwatchEvents.SetIsFabric(isFabric: true)); (templateSelectionController as ClothingTemplateSelectionController).Init(categoryToSelect); } else if (mode == CustomizerMode.FURNITURE) { equipmentCustomizationController.SetDependancies(templateSelectionController, templateChosenController, propertyCustomizationController, mainModel); } equipmentCustomizationController.Init(); Service.Get <ICPSwrveService>().StartTimer("designer_time", "my_style.designer"); }
public void SetDependancies(TemplateSelectionController templateSelectionController, TemplateChosenController templateChosenController, PropertyCustomizationController propertyCustomizationController, CustomizerModel customizerModel) { this.templateSelectionController = templateSelectionController; this.templateChosenController = templateChosenController; this.propertyCustomizationController = propertyCustomizationController; this.customizerModel = customizerModel; }
public void SetModel(CustomizerModel customizerModel) { this.customizerModel = customizerModel; itemModel = customizerModel.ItemCustomization; }
public void Init(CustomizerModel customizerModel) { this.customizerModel = customizerModel; }