Add ability to start game with Enter

This commit is contained in:
James Skemp 2023-10-10 21:11:50 -05:00
parent ac75d87263
commit 3cdfd4eaa7
2 changed files with 14 additions and 1 deletions

View File

@ -1,8 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://da1pa0jmrsvrn"]
[gd_scene load_steps=5 format=3 uid="uid://da1pa0jmrsvrn"]
[ext_resource type="Script" path="res://HUD.gd" id="1_7sw6g"]
[ext_resource type="FontFile" uid="uid://bxnsxbkp1qyba" path="res://fonts/Xolonium-Regular.ttf" id="2_rm0d0"]
[sub_resource type="InputEventAction" id="InputEventAction_mr8vk"]
action = &"start_game"
[sub_resource type="Shortcut" id="Shortcut_wayr1"]
events = [SubResource("InputEventAction_mr8vk")]
[node name="HUD" type="CanvasLayer"]
script = ExtResource("1_7sw6g")
@ -53,6 +59,7 @@ grow_horizontal = 2
grow_vertical = 0
theme_override_fonts/font = ExtResource("2_rm0d0")
theme_override_font_sizes/font_size = 64
shortcut = SubResource("Shortcut_wayr1")
text = "Start"
[node name="MessageTimer" type="Timer" parent="."]

View File

@ -43,3 +43,9 @@ move_down={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
start_game={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194310,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}