RandomGFGoStop/Assets/Scripts/UI/Popup/MissionSuccessPopup.cs

28 lines
838 B
C#
Raw Normal View History

2025-09-05 21:40:01 +00:00
using CodeJay.Enum;
2025-09-04 23:20:04 +00:00
using System.Collections;
2025-09-05 21:40:01 +00:00
using System.Collections.Generic;
2025-09-04 23:20:04 +00:00
using TMPro;
using UnityEngine;
public class MissionSuccessPopup : MonoBehaviour
{
public TextMeshProUGUI t_mission;
2025-09-05 21:40:01 +00:00
public void Set(List<ECardType> cards = null)
2025-09-04 23:20:04 +00:00
{
gameObject.SetActive(true);
GameManager.Sound.PlaySFX(ESFXType.Open_Popup);
StartCoroutine(Co_Off());
2025-09-05 21:40:01 +00:00
t_mission.text = cards == null ? $"메인미션 x{GamePanel.Instance.dic_missionRate[GamePanel.Instance.CurMission]}" :
$"서브미션 x{GamePanel.Instance.dic_submisstionRate[GamePanel.Instance.CurSubMission]}";
GetComponent<MissionSuccessPopup_Set>().Set(cards);
2025-09-04 23:20:04 +00:00
}
IEnumerator Co_Off()
{
yield return new WaitForSeconds(2.5f);
gameObject.SetActive(false);
}
}