[TASK] Added more duck spawn, performance fixes, instruction in the minigame, option to zoom in on stickers
This commit is contained in:
34
Assets/StickerZoomDisplay.cs
Normal file
34
Assets/StickerZoomDisplay.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class StickerZoomDisplay : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image stickerImage;
|
||||
[SerializeField] private TMP_Text stickerLabel;
|
||||
|
||||
private DuckStickerData _sticker;
|
||||
public DuckStickerData Sticker
|
||||
{
|
||||
get { return _sticker; }
|
||||
set
|
||||
{
|
||||
_sticker = value;
|
||||
stickerLabel.text = _sticker.Label;
|
||||
stickerImage.sprite = _sticker.StickerSprite;
|
||||
}
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user