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.
41 lines
1.0 KiB
41 lines
1.0 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AnimEmotesManager : TogglePanel
|
|
{
|
|
[Header("References")]
|
|
[SerializeField] private GameObject animationsPanel;
|
|
[SerializeField] private GameObject emojisPanel;
|
|
[SerializeField] private Transform emojiContent;
|
|
|
|
[Header("Data")]
|
|
[SerializeField] private EmojiPopupData emojiPopupData;
|
|
[SerializeField] private EmojiButton emojiButtonPrefab;
|
|
|
|
private void Start()
|
|
{
|
|
for (int i = 0; i < emojiPopupData.Emojis.Count; i++)
|
|
{
|
|
EmojiButton button = Instantiate(emojiButtonPrefab, emojiContent);
|
|
button.Initialize(emojiPopupData.Emojis[i], i);
|
|
}
|
|
}
|
|
|
|
public void PlayAnim(string anim)
|
|
{
|
|
GameManager.Instance.PlayAnim(anim);
|
|
}
|
|
|
|
public void SetAnimationPanel()
|
|
{
|
|
emojisPanel.SetActive(false);
|
|
animationsPanel.SetActive(true);
|
|
}
|
|
|
|
public void SetEmojiPanel()
|
|
{
|
|
animationsPanel.SetActive(false);
|
|
emojisPanel.SetActive(true);
|
|
}
|
|
}
|
|
|