Пример #1
0
 internal void Show(Unlockable unlockable, UIListItemUnlockable uIListItemUnlockable)
 {
     this.gameObject.SetActive(true);
     _unlockable              = unlockable;
     _uIListItemUnlockable    = uIListItemUnlockable;
     _priceText.text          = _unlockable.Price.ToString();
     _previewRawImage.texture = _unlockable.Preview.texture;
 }
Пример #2
0
 protected override void Awake()
 {
     base.Awake();
     foreach (Unlockable unlockable in GetUnlockables())
     {
         GameObject           newGameObject = Instantiate(_uIListItemUnlockablePrefab.gameObject);
         UIListItemUnlockable newUIListItem = newGameObject.GetComponent <UIListItemUnlockable>();
         newUIListItem.Populate(unlockable, this, ClickCallback);
         Add(newUIListItem);
     }
 }
Пример #3
0
 private void ClickCallback(Unlockable unlockable, UIListItemUnlockable uIListItemUnlockable)
 {
     if (unlockable.Unlocked)
     {
         if (_unlockableType == UnlockableType.Costume)
         {
             _uIBipedDesigner.SetCostume(unlockable);
         }
         else if (_unlockableType == UnlockableType.Effect)
         {
             _uIBipedDesigner.SetEffect(unlockable);
         }
         Close();
     }
     else
     {
         _uIUnlockScreen.Show(unlockable, uIListItemUnlockable);
     }
 }