//アイテムの選択 public void PushSomeIcon(Sprite someItem) { ImageSelectedItem.GetComponent <Image>().sprite = someItem; ImageSelectedItemLarge.GetComponent <Image>().sprite = someItem; ImageSelectedItem.SetActive(true); ButtonSelectedItemLarge.SetActive(true); audioSource.PlayOneShot(selectItemSE); }
//アイテムの選択 public void PushSomeIcon(Sprite someItem) { Sprite alt1 = ButtonKeyUpIcon.GetComponent <Image>().sprite; Sprite alt2 = ButtonKeyDownIcon.GetComponent <Image>().sprite; Sprite alt3 = ImageSelectedItem.GetComponent <Image>().sprite; if (((someItem == alt1) && (alt3 == alt2)) || ((someItem == alt2) && (alt3 == alt1))) { MergeKey(); ImageSelectedItem.SetActive(false); } else { ImageSelectedItem.GetComponent <Image>().sprite = someItem; ImageSelectedItemLarge.GetComponent <Image>().sprite = someItem; ImageSelectedItem.SetActive(true); ButtonSelectedItemLarge.SetActive(true); audioSource.PlayOneShot(selectItemSE); } }