51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ObtainItemUI : uScrollViewMgr
|
|
{
|
|
public static ObtainItemUI Ins;
|
|
private void Start() { Ins = this; go_child.SetActive(false); }
|
|
|
|
public GameObject go_child, go_tabtoexit;
|
|
public GameObject[] gos; // 0 연출, 1 결과 화면
|
|
|
|
bool CanExist;
|
|
List<ItemSimpleData> list_item = new List<ItemSimpleData>();
|
|
|
|
public void Set(ItemSimpleData item)
|
|
{
|
|
if (list_item.Count == 0) list_item.Add(new ItemSimpleData());
|
|
list_item[0].itemid = item.itemid;
|
|
list_item[0].amount = item.amount;
|
|
Set(list_item);
|
|
}
|
|
public void Set(List<ItemSimpleData> lst)
|
|
{
|
|
base.Set();
|
|
CanExist = false;
|
|
go_child.SetActive(true);
|
|
go_tabtoexit.SetActive(false);
|
|
Set_ScrollView(lst);
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
DSUtil.InActivateGameObjects(gos, 0);
|
|
yield return new WaitForSeconds(.2f);
|
|
DSUtil.InActivateGameObjects(gos, 1);
|
|
yield return new WaitForSeconds(.2f);
|
|
go_tabtoexit.SetActive(true);
|
|
CanExist = true;
|
|
}
|
|
|
|
public override void OnClick_Back()
|
|
{
|
|
if (CanExist)
|
|
{
|
|
go_child.SetActive(false);
|
|
Del_BackKey();
|
|
}
|
|
}
|
|
} |