summaryrefslogtreecommitdiff
path: root/stage/hud.gd
diff options
context:
space:
mode:
Diffstat (limited to 'stage/hud.gd')
-rw-r--r--stage/hud.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/stage/hud.gd b/stage/hud.gd
index 8a0b146..01b00d4 100644
--- a/stage/hud.gd
+++ b/stage/hud.gd
@@ -40,3 +40,16 @@ func _on_button_pressed() -> void:
grid_selector.process_mode = Node.PROCESS_MODE_INHERIT
grid_selector.current_state = grid_selector.get_node("StateMoveMode")
visible = false
+
+
+func _on_button_3_pressed() -> void:
+ var dice_throw_scene = load("res://stage/dice_throw/dice_throw.tscn")
+ var dice_throw = dice_throw_scene.instantiate()
+ get_tree().root.add_child(dice_throw)
+ dice_throw.position -= dice_throw.size * 0.5
+ dice_throw.throw_finished.connect(func():
+ dice_throw.queue_free()
+ get_tree().current_scene.process_mode = PROCESS_MODE_INHERIT
+ grid_selector.current_state = grid_selector.state_cube_placement
+ )
+ get_tree().current_scene.process_mode = PROCESS_MODE_DISABLED