53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class UI_Panel_Mail : MonoBehaviour
|
|
{
|
|
//1234567890
|
|
[SerializeField] float anim_Time = 0.5f;
|
|
float Anim_Speed => 1f / anim_Time;
|
|
[SerializeField] List<Animator> ui_Anim;
|
|
|
|
[Header("paths")]
|
|
[SerializeField] private string editor_mailSO_Path;
|
|
[SerializeField] private string runtime_mailSO_Path;
|
|
[Header("objects")]
|
|
public GameObject noticeSlotPrefab;
|
|
[SerializeField] Transform content_Notice_Slot;
|
|
|
|
[Header("texts")]
|
|
public Text thisMail_title;
|
|
public Text thisMail_body;
|
|
public Text thisMail_time;
|
|
public Text thisMail_sender;
|
|
private void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Escape))
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
void Start()
|
|
{
|
|
foreach (var item in ui_Anim)
|
|
{
|
|
item.speed = Anim_Speed;
|
|
}
|
|
StartCoroutine(C_Slot_Show());
|
|
}
|
|
IEnumerator C_Slot_Show()
|
|
{
|
|
var slots = content_Notice_Slot.GetComponentsInChildren<Button>();
|
|
foreach (var item in slots)
|
|
{
|
|
item.gameObject.SetActive(false);
|
|
}
|
|
foreach (var item in slots)
|
|
{
|
|
yield return new WaitForSeconds(0.1f);
|
|
item.gameObject.SetActive(true);
|
|
}
|
|
|
|
}
|
|
} |