}//선택된 슬롯 점멸효과 IEnumerator OoCCoroutine(string _Y, string _N) { ui.PlaySound(enter_sound); stopKeyInput = true; goOOC.SetActive(true); theOOC.ShowChoice(_Y, _N); yield return(new WaitUntil(() => !theOOC.activated)); if (theOOC.GetResult()) { for (int i = 0; i < inventoryItemList.Count; i++) { if (selectedTab == 0) { if (inventoryItemList[i].itemID == slots[selectedItem].itemID) { theDB.UseItem(inventoryItemList[i].itemID); if (inventoryItemList[i].itemCount > 1) { inventoryItemList[i].itemCount--; } else { inventoryItemList.RemoveAt(i); } ShowItem(); break; } } else if (selectedTab == 1) { if (inventoryItemList[i].itemID == slots[selectedItem].itemID) { Debug.Log(i + "/" + inventoryItemList[i].itemID + "/" + inventoryTabList[selectedItem].itemID); ui.EquipItem(inventoryItemList[i]); inventoryItemList.RemoveAt(i); ShowItem(); break; } } } } stopKeyInput = false; goOOC.SetActive(false); }
IEnumerator OoCCoroutine(string _Y, string _N) { goOOC.SetActive(true); theOOC.ShowChoice(_Y, _N); yield return(new WaitUntil(() => !theOOC.activated)); if (theOOC.GetResult()) { ui.ReturnItem(equipmentList[selectedSlot]); TakeOffEffect(equipmentList[selectedSlot]); ShowText(); if (selectedSlot == WEAPON) { equipedWeapon.SetActive(false); } else if (selectedSlot == ARMOR) { equipedArmor[0].GetComponent <SpriteRenderer>().sprite = armors[0]; equipedArmor[1].GetComponent <SpriteRenderer>().sprite = leftArm[0]; equipedArmor[2].GetComponent <SpriteRenderer>().sprite = rightArm[0]; } else if (selectedSlot == GAUNTLET) { equipedGauntlets[0].GetComponent <SpriteRenderer>().sprite = rightGauntlets[0]; equipedGauntlets[1].GetComponent <SpriteRenderer>().sprite = rightGauntlets[0]; } else if (selectedSlot == PANTS) { equipedPants[0].GetComponent <SpriteRenderer>().sprite = pants[0]; equipedPants[1].GetComponent <SpriteRenderer>().sprite = leftLeg[0]; equipedPants[2].GetComponent <SpriteRenderer>().sprite = rightLeg[0]; equipedPants[3].GetComponent <SpriteRenderer>().sprite = leftGuard[0]; equipedPants[4].GetComponent <SpriteRenderer>().sprite = rightGuard[0]; } else if (selectedSlot == BOOTS) { equipedBoots[0].GetComponent <SpriteRenderer>().sprite = leftBoots[0]; equipedBoots[1].GetComponent <SpriteRenderer>().sprite = rightBoots[0]; } equipmentList[selectedSlot] = new Item(0, "", "", Item.ItemType.Equip); ui.PlaySound(takeoffSound); ClearEquip(); ShowEquip(); } inputKey = true; goOOC.SetActive(false); }