//아이템 버튼 클릭시 처리 : 첫번째 클릭-선택, 두번째 클릭 - 구매 public void OnClickItemBtn(int itemNumber) { string buttonName = getItemButtonName(itemNumber); GameObject itemBtn = shopUI_.transform.Find(buttonName).gameObject; if (itemBtn != null) { if (currentClickedItem_ == itemBtn) { Constant.ItemDef item = (Constant.ItemDef)itemNumber; if (gameManagerScript_.BuyItem(item, calcItemPrice(item)) == true) { ChangeItemBtnState(itemNumber, false); currentClickedItem_ = null; selectRect_.SetActive(false); } } else { Debug.Log("Select : " + buttonName + itemBtn.GetComponent <RectTransform>().localPosition); selectRect_.SetActive(true); currentClickedItem_ = itemBtn; selectRect_.GetComponent <RectTransform>().localPosition = currentClickedItem_.GetComponent <RectTransform>().localPosition; //selectRect_.GetComponent<RectTransform>(). //currentClickedItem_.transform.localScale.Scale(new Vector3(1.1f, 1.1f, 1.0f)); } } }