using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class MagicBlossomUI : BackKeyAdd { public GameObject[] gos; // 0 블라썸, 1 설명 팝업, 2 확인 버튼 public UISprite[] sprites; // 0 1 등급, 2 3 아이콘 public UILabel[] labels; // 0 타이틀, 1 설명 public Transform tf_icon; public ParticleSystem PS_CardGlow; public void Set(int _step, SkillListTableData _magic, Action _refresh) { base.Set(); DontBack = true; var psmain = PS_CardGlow.main; //psmain.startColor = MyValue.Get_SliderGradeColor(_magic.e_Grade); //sprites[0].spriteName = sprites[1].spriteName = DSUtil.Get_GradeSpriteName(_magic.e_Grade); //sprites[2].spriteName = sprites[3].spriteName = _magic.s_Icon; //labels[0].text = DSUtil.Format("{0}{1} 개화", MyValue.Get_GradeColor(_magic.e_Grade), _magic.n_SkillName); //labels[1].text = _magic.Get_SkillEnhanceDesc(_step); StartCoroutine(Co_Blossom(_refresh)); } IEnumerator Co_Blossom(Action _refresh) { SoundInfo.Ins.Play_OneShot(eSound.s016_MagicStepOpen, 0.7f); DSUtil.InActivateGameObjects(gos, 0); tf_icon.localPosition = Vector3.zero; float t = 0f, time = 0f; var targetpos = Vector3.up * 200f; while (time < 2f) { yield return null; time += Time.deltaTime; t += Time.deltaTime * 1.33f; tf_icon.localPosition = Vector3.Lerp(Vector3.zero, targetpos, t); } // 팝업 보여주기 DSUtil.InActivateGameObjects(gos, 1); yield return new WaitForSeconds(0.5f); gos[2].SetActive(true); DontBack = false; _refresh?.Invoke(); } }