[TASK] Show collected duck stickers

This commit is contained in:
2019-08-24 00:31:21 +02:00
parent 279c5fbbbe
commit c8ab81a848
43 changed files with 4969 additions and 97 deletions

37
Assets/StickerDisplay.cs Normal file
View File

@@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class StickerDisplay : MonoBehaviour
{
public TMP_Text label;
public TMP_Text duckCount;
public Image stickerImage;
private DuckStickerData _sticker;
public DuckStickerData Sticker
{
get { return _sticker; }
set
{
_sticker = value;
label.text = _sticker.Label;
stickerImage.sprite = _sticker.StickerSprite;
}
}
private int _collectedCount;
public int CollectedCount
{
get => _collectedCount;
set
{
_collectedCount = value;
duckCount.text = _collectedCount + "x";
}
}
}