public void SetSelection(BlockSlot_Bar slot) { if (m_SelectedSlot != null) { m_SelectedSlot.DisSelect(); } m_SelectedSlot = slot; }
public void OnSelectSlot(BlockSlot_Bar Slot) { //Case: Block Menu is Opened if (m_BlockMenu.IsOpened) { Slot.DisSelect(); if (m_BlockMenu.IsSlotSelected) { Slot.SetBlock(m_BlockMenu.SelectedBlock); } m_BlockMenu.ClearSelection(); } else { //DisSelect Current Slot if (m_SelectedSlot != null) { m_SelectedSlot.DisSelect(); } //Set Selected Slot m_SelectedSlot = Slot; //Change Color m_SelectedSlot.GetComponent <Image>().color = m_SelectedColor; //Set Picker m_Picker.SelectedBlock = m_SelectedSlot._Block; } }