This commit is contained in:
Spencer Killen 2026-09-27 15:19:40 -06:00
parent 379686e44d
commit ea4bf5efdb
Signed by: sjkillen
GPG key ID: 1DAA9D8D7C6ADD05
5 changed files with 73 additions and 1 deletions

View file

@ -66,6 +66,7 @@ func produce(production: Production):
sync_currency.call_deferred()
var c := get_currency(production.currency)
c.amount += production.amount
c.amount = clamp(c.amount, 0, 9999)
func update_currencies():
productions_update.emit.call_deferred(currencies)
@ -116,6 +117,7 @@ func get_all_inanimate_currencies() -> Array:
func _ready() -> void:
%SimulateTickTimer.start()
update_currencies()
log.emit.call_deferred("Welcome to your kingdom!")
func _on_timer_timeout() -> void:
if get_tree().current_scene.scene_file_path != "res://game.tscn":

View file

@ -10,7 +10,7 @@ config_version=5
[application]
run/main_scene="uid://dkui3dlb4vu1c"
run/main_scene="uid://d1hx10534r452"
config/features=PackedStringArray("4.7")
[autoload]

10
start_screen.gd Normal file
View file

@ -0,0 +1,10 @@
extends Control
func _on_button_pressed() -> void:
Dialogic.start(preload("res://test/timeline.dtl"))
await Dialogic.timeline_ended
get_tree().change_scene_to_file("res://game.tscn")
func _on_button_2_pressed() -> void:
get_tree().change_scene_to_file("res://game.tscn")

1
start_screen.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://qt8u20vettgk

59
start_screen.tscn Normal file
View file

@ -0,0 +1,59 @@
[gd_scene format=3 uid="uid://d1hx10534r452"]
[ext_resource type="Script" uid="uid://qt8u20vettgk" path="res://start_screen.gd" id="1_ncxyx"]
[node name="StartScreen" type="Control" unique_id=637740603]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ncxyx")
[node name="ColorRect" type="ColorRect" parent="." unique_id=490588497]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=384868949]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -54.0
offset_top = -71.0
offset_right = 54.0
offset_bottom = -31.0
grow_horizontal = 2
grow_vertical = 0
[node name="Button" type="Button" parent="HBoxContainer" unique_id=1726767847]
layout_mode = 2
text = "Play Game"
[node name="Button2" type="Button" parent="HBoxContainer" unique_id=783169397]
layout_mode = 2
text = "Skip Intro"
[node name="Label" type="Label" parent="." unique_id=380038515]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -481.0
offset_top = 77.0
offset_right = 482.0
offset_bottom = 169.0
grow_horizontal = 2
theme_override_font_sizes/font_size = 72
text = "For King and Currency"
[connection signal="pressed" from="HBoxContainer/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="HBoxContainer/Button2" to="." method="_on_button_2_pressed"]