46 lines
1002 B
C#
46 lines
1002 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Menu_EnterClass : MonoBehaviour
|
|
{
|
|
public static Menu_EnterClass instance;
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
public IEnumerator IncreaseLocalScale()
|
|
{
|
|
yield break;
|
|
}
|
|
|
|
public IEnumerator AnimeEnterClass(Transform trAnime, Color color)
|
|
{
|
|
List<CanvasGroup> canvasGroups = new List<CanvasGroup>();
|
|
|
|
for (int i = 0; i < trAnime.childCount; i++)
|
|
{
|
|
canvasGroups.Add(trAnime.GetChild(i).gameObject.AddComponent<CanvasGroup>());
|
|
canvasGroups[i].alpha = 1;
|
|
}
|
|
|
|
yield return new WaitForEndOfFrame();
|
|
|
|
float value = 1;
|
|
|
|
while (value > 0)
|
|
{
|
|
value -= Time.deltaTime * 8;
|
|
|
|
foreach (CanvasGroup item in canvasGroups)
|
|
{
|
|
item.alpha = value;
|
|
}
|
|
|
|
yield return new WaitForEndOfFrame();
|
|
}
|
|
}
|
|
}
|