You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
574 B
25 lines
574 B
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class EmojiPopup : MonoBehaviour
|
|
{
|
|
[SerializeField] private Canvas canvas;
|
|
[SerializeField] private Image image;
|
|
|
|
public void Initialize(int emojiIndex)
|
|
{
|
|
image.sprite = GameManager.EmojiPopupData.Emojis[emojiIndex];
|
|
transform.localPosition = new Vector3(0, 2, 0);
|
|
canvas.worldCamera = GameManager.MainCamera;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
transform.rotation = Quaternion.Euler(45, 0, 0);
|
|
}
|
|
|
|
public void Delete()
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
|