[TASK] Added main "game manager" to switch between the minigame and the map + added simple UI to show that a sticker was collected
This commit is contained in:
31
Assets/DuckCollectedSuccessScreen.cs
Normal file
31
Assets/DuckCollectedSuccessScreen.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DuckCollectedSuccessScreen : MonoBehaviour
|
||||
{
|
||||
public Image stickerImage;
|
||||
public TMP_Text stickerName;
|
||||
|
||||
public UnityEvent OkButtonClicked;
|
||||
|
||||
private DuckStickerData _sticker;
|
||||
|
||||
public DuckStickerData Sticker
|
||||
{
|
||||
get => _sticker;
|
||||
set {
|
||||
_sticker = value;
|
||||
stickerImage.sprite = _sticker.StickerSprite;
|
||||
stickerName.text = _sticker.Label;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnOkButtonClicked()
|
||||
{
|
||||
OkButtonClicked?.Invoke();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user