summaryrefslogtreecommitdiff
path: root/stage/hud.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-02-08 14:41:11 +0100
committerDaniel Weipert <git@mail.dweipert.de>2025-02-08 14:41:11 +0100
commitd24180c58e9e1d6149f0ac41d4f4bbaf674bdbd3 (patch)
treeb3316011d7ed6cfa43f6988bd6e05af3b311a495 /stage/hud.gd
parenta210c39b5d2be1e7e5c52568d40ba6a29f34b4bb (diff)
next commit
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