public void OnAbilitySlotKeyPressed(int i) { PlayerAbilitySlot targetSlot = MainHUD.GetAbilitySlotByIndex(i - 1); if (targetSlot.CurrentCard != null) { deckManager.Hand.PlayCard(targetSlot.CurrentCard, Controller.collisionInfo, targetSlot.slotType); } //deckManager.Hand.PlayCard() }
public void SetQuickBarSlot(AbilityCard abilityCard, SlotType slotType = SlotType.Cycling) { //if(slotIndex > quickbarSlots.Count) { // Debug.LogError("[PlayerQuickBar] index out of range. " + slotIndex + " is more than 4"); //} PlayerAbilitySlot targetSlot = GetFirstEmptySlot(slotType); if (targetSlot == null) { Debug.Log("Couldn't get slot"); } targetSlot.SetSlotAbility(abilityCard); }