Remove debug prints and fix cards not running with in range dice
This commit is contained in:
parent
5bd9d2efb3
commit
634c9e9d30
@ -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
|
||||
|
@ -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 = ""):
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user