public void UpdateItemTarget(PlayerActor currentPlayer, int currentIndex) { m_currentPlayer = currentPlayer; m_currentItemIndex = currentIndex; m_putLabel.passive = !m_currentPlayer.CanPutItemOnGround(currentIndex); m_throwLabel.passive = !m_currentPlayer.CanThrowItem(currentIndex); m_equipLabel.passive = !m_currentPlayer.CanEquipItem(currentIndex); //m_useLabel.passive = !m_currentPlayer.CanUseItem(currentIndex); string uselabel = null; if( m_currentPlayer.CanEquipItem(currentIndex) ) { uselabel = m_currentPlayer.IsEquippingItem(currentIndex) ? "はずす" : "そうび"; m_useLabel.passive = false; } else if(m_currentPlayer.CanEatItem(currentIndex)) { uselabel = "たべる"; m_useLabel.passive = false; } else { uselabel = "つかう"; m_useLabel.passive = !m_currentPlayer.CanUseItem(currentIndex); } m_useLabel.label.text = uselabel; // TODO: m_equipLabel.label.text = ""; m_equipLabel.passive = true; }