Exemplo n.º 1
0
 public void RewardItem(IllustrationItem item)
 {
     if (rewardedItemList.Contains(item.id))
     {
         return;
     }
     rewardedItemList.Add(item.id);
     Save();
 }
Exemplo n.º 2
0
 void AdaptItem(GameObject item, IllustrationItem itemData)
 {
     itemData.rewarded = IllustrationService.shared.IsRewarded(itemData);
     item.Query <Image>("Image").sprite = itemData.rewarded ? itemData.image : thumbPlaceholder;
     item.Query <Text>("Name").text     = itemData.name;
     item.GetComponent <Button>().onClick.AddListener(() => {
         if (itemData.rewarded)
         {
             ShowIllustration(itemData);
         }
     });
 }
Exemplo n.º 3
0
 public bool IsRewarded(IllustrationItem item)
 {
     return(rewardedItemList.Contains(item.id));
 }
Exemplo n.º 4
0
 void ShowIllustration(IllustrationItem itemData)
 {
     bigImage.sprite = itemData.image;
     bigImage.gameObject.SetActive(true);
     bigImage.gameObject.ScaleFrom(Vector3.zero, 0.4f, 0f);
 }