public void PopupGetGacha(GachaSystem.GachaType gachaType) { if (PopupGetGachaUI != null) { showUIanimation(PopupGetGachaUI); PopupGetGachaUI.GetComponent <UI_GetGacha>().GachaStart(gachaType); } else { Debugging.Log("가챠 팝업창이 없습니다."); } }
public void GachaStart(GachaSystem.GachaType gachaType) { GetComponent <Button>().interactable = false; tabText.enabled = false; foreach (Transform child in ItemView.transform) { Destroy(child.gameObject); } switch (gachaType) { case GachaSystem.GachaType.SpecialFive: List <Item> gachaItems = GachaSystem.StartSpeicalGachaMultiple(ItemSystem.GetEquipmentItems(), 5); StartCoroutine(ShowGetGachas(gachaItems)); break; case GachaSystem.GachaType.SpecialOne: Item gachaItem = GachaSystem.StartSpeicalGacha(ItemSystem.GetEquipmentItems(), User.gachaSeed); StartCoroutine(ShowGetGacha(gachaItem)); break; case GachaSystem.GachaType.NormalFive: List <Item> gachaItemsNormal = GachaSystem.StartNormalGachaMultiple(ItemSystem.GetEquipmentItems(), 5); StartCoroutine(ShowGetGachas(gachaItemsNormal)); break; case GachaSystem.GachaType.NormalOne: Item gachaItemNormal = GachaSystem.StartNormalGacha(ItemSystem.GetEquipmentItems(), User.gachaSeed); StartCoroutine(ShowGetGacha(gachaItemNormal)); break; case GachaSystem.GachaType.FreeAd: Item gachaItemFree = GachaSystem.StartSpeicalGacha(ItemSystem.GetEquipmentItems(), User.gachaSeed); StartCoroutine(ShowGetGacha(gachaItemFree)); break; } }