thewar_client/Client/Assets/1_Script/System/GetItemWindows.cs

62 lines
1.8 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetItemWindows : SingletonMonoBehaviour<GetItemWindows>
{
//아이템 획득 정보 필요
//아이템 이펙트
private bool isAnim = false;
protected override void OnAwake()
{
gameObject.SetActive(false);
}
public void SetUI(long addGold, long addCash, List<DeckUnitInfo> deckUnit, List<Equipment> equipment, List<ConsumableItem> consumableItem, List<EtcItem> etcItem)
{
isAnim = true;
gameObject.SetActive(true);
if (addGold > 0)
Debug.Log($"{addGold}골드 획득!");
if (addCash > 0)
Debug.Log($"{addCash}케쉬 획득!");
if (deckUnit != null && deckUnit.Count != 0)
{
for(int n = 0; n < deckUnit.Count; n++)
{
Debug.Log($"{deckUnit[n].unit_data_id}케릭터 획득!");
}
}
if (equipment != null && equipment.Count != 0)
{
for (int n = 0; n < equipment.Count; n++)
{
Debug.Log($"{equipment[n].equipment_data_id}장비 획득!");
}
}
if (consumableItem != null && consumableItem.Count != 0)
{
for (int n = 0; n < consumableItem.Count; n++)
{
Debug.Log($"{consumableItem[n].consumable_item_data_id}아이탬 {consumableItem[n].count}개획득!");
}
}
if (etcItem != null && etcItem.Count != 0)
{
for (int n = 0; n < etcItem.Count; n++)
{
Debug.Log($"{etcItem[n].etc_item_data_id}아이탬 {etcItem[n].count}개획득!");
}
}
//임시
isAnim = false;
}
public void OnExit()
{
if (!isAnim)
gameObject.SetActive(false);
}
}