Пример #1
0
 private void GenerateClothesViews(Clothes[] materials, Transform container)
 {
     for (int i = 0, l = materials.Length; i < l; i++)
     {
         ClothesView clothesView = Instantiate(_template, container);
         clothesView.ButtonClicked += OnSelectClothesButtonClick;
         clothesView.Render(materials[i]);
     }
 }
Пример #2
0
 private void OnSelectClothesButtonClick(Clothes clothesObject, ClothesView view)
 {
     _playerRenderer.material = clothesObject.ClothesMaterial;
 }