diff --git a/UI/CardView.gd b/UI/CardView.gd index 886615e..2c2dd72 100644 --- a/UI/CardView.gd +++ b/UI/CardView.gd @@ -71,8 +71,9 @@ func _physics_process(delta): #if the enter key is pressed, input the dice into the card if Input.is_action_just_pressed("ui_accept"): - current_cards[hovering_card].dice_inputted(currently_holding_dice) current_cards[hovering_card].hovering_dice = null + current_cards[hovering_card].dice_inputted(currently_holding_dice) + hovering_card = 0 selected = false diff --git a/UI/DiceView.gd b/UI/DiceView.gd index dc43605..c36f194 100644 --- a/UI/DiceView.gd +++ b/UI/DiceView.gd @@ -17,6 +17,11 @@ func _physics_process(delta): selected_dice = null return + # skip turn if the list is empty + if len(current_dice) == 0: + selected = false + return + # if selected dice is null, add a value if not selected_dice: selected_dice = 0