/** * Change the spell held in given hand to the spell * according to element(s) in queue * * Example call: * ConfirmSpell(Hands.left) **/ void ConfirmSpell(Hands.handEnum hand) { if (elemsSelected.isNonePair()) { Debug.Log("[SpellController][ConfirmSpell] no elements are chosen"); return; } RemoveElementsFromHand(hand); // first reset hand's current selection // todo: may want to sort? - Shaun if (hand == Hands.handEnum.left) { leftHandElementsPair.clear(); leftHandElementsPair.pushIfPossibleElseClearAndPush(elemsSelected.First); leftHandElementsPair.pushIfPossibleElseClearAndPush(elemsSelected.Second); } else if (hand == Hands.handEnum.right) { rightHandElementsPair.clear(); rightHandElementsPair.pushIfPossibleElseClearAndPush(elemsSelected.First); rightHandElementsPair.pushIfPossibleElseClearAndPush(elemsSelected.Second); } else { Debug.Log("ConfirmSpell was given an invalid hand."); } updateHandElementsSelectionSprite(hand); clearCurrentSelectedElements(); }