diff --git a/UI/Card.gd b/UI/Card.gd index bbb367c..fa71eba 100644 --- a/UI/Card.gd +++ b/UI/Card.gd @@ -74,7 +74,7 @@ func dice_inputted(dice_number): return #check if dice is within dice range - if dice_number >= 1 and dice_number <= 6: + if dice_number < 1 and dice_number > 6: return #if accepted dice is specified, check if the dice is in the list diff --git a/UI/CardView.gd b/UI/CardView.gd index 6e41b99..7456466 100644 --- a/UI/CardView.gd +++ b/UI/CardView.gd @@ -14,7 +14,6 @@ var currently_holding_dice = null func set_currently_holding_dice(dice_number : int): currently_holding_dice = dice_number - print(dice_number) func _physics_process(delta): @@ -50,9 +49,12 @@ func _physics_process(delta): # show the dice over the card if hovering current_cards[hovering_card].hovering_dice = currently_holding_dice - #if the enter key is pressed, remove the selected card and emit the signal + #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 + selected = false + func draw_card(specific_card : String = ""): diff --git a/UI/DiceView.gd b/UI/DiceView.gd index 895d985..dc43605 100644 --- a/UI/DiceView.gd +++ b/UI/DiceView.gd @@ -47,8 +47,6 @@ func _physics_process(delta): #if the enter key is pressed, remove the selected dice and emit the signal if Input.is_action_just_pressed("ui_accept"): emit_signal("dice_selected", current_dice[selected_dice].dice_value) - print(current_dice[selected_dice].dice_value) - print("current_dice[selected_dice].dice_value") current_dice[selected_dice].queue_free() current_dice.remove(selected_dice)