//Adds an item or skill to the Hotkey public void AddToKey(int id, Hotkey.HotkeyType type) { //If there was already something in this slot, destroy it if (!key.hotkeyType.Equals(Hotkey.HotkeyType.EMPTY)) { EmptySlot(); } key.UpdateHotkey(id, type); //Updates the hotkey with the type (skill or item) and the id }
//Adds the skill or item to a hotkey slot. To be used by the DragHandlers. public void DraggedToHotkey(Transform parent, int id, Hotkey.HotkeyType type) { hotkeysByName[parent.name].AddToKey(id, type); //Get the appropriate hotkey slot and add it. }