diff options
author | tpart <tpart120@proton.me> | 2024-07-01 23:08:12 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-07-01 23:17:21 +0200 |
commit | b51829c8b36881a3e378e589593bf8395acd1b3b (patch) | |
tree | 4c341986ea8bee84bc39faf7355ee5a9b01f0b69 /client/player/onscreen_controls/controls.tscn | |
parent | 15e5a356f9d27091dbd82d76978fd3fcf5d4d13d (diff) | |
download | hurrycurry-b51829c8b36881a3e378e589593bf8395acd1b3b.tar hurrycurry-b51829c8b36881a3e378e589593bf8395acd1b3b.tar.bz2 hurrycurry-b51829c8b36881a3e378e589593bf8395acd1b3b.tar.zst |
Add on-screen controls
Diffstat (limited to 'client/player/onscreen_controls/controls.tscn')
-rw-r--r-- | client/player/onscreen_controls/controls.tscn | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/client/player/onscreen_controls/controls.tscn b/client/player/onscreen_controls/controls.tscn new file mode 100644 index 00000000..36505c7b --- /dev/null +++ b/client/player/onscreen_controls/controls.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=5 format=3 uid="uid://bq2sqb1u1l5ve"] + +[ext_resource type="PackedScene" uid="uid://dmr0fcamx7t56" path="res://player/onscreen_controls/virtual_joystick_scene.tscn" id="1_4k4lh"] +[ext_resource type="Script" path="res://player/onscreen_controls/controls.gd" id="1_rnoki"] +[ext_resource type="Texture2D" uid="uid://bnxllatlo4clg" path="res://menu/boost.webp" id="2_i4ife"] +[ext_resource type="Texture2D" uid="uid://dcgt82qkya880" path="res://menu/interact.webp" id="3_37rne"] + +[node name="UI" type="CanvasLayer"] +script = ExtResource("1_rnoki") + +[node name="MovementStick" parent="." instance=ExtResource("1_4k4lh")] + +[node name="Buttons" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -300.0 +offset_top = -300.0 +grow_horizontal = 0 +grow_vertical = 0 + +[node name="Boost" type="TouchScreenButton" parent="Buttons"] +position = Vector2(150, 25) +scale = Vector2(0.5, 0.5) +texture_normal = ExtResource("2_i4ife") + +[node name="Interact" type="TouchScreenButton" parent="Buttons"] +position = Vector2(150, 150) +scale = Vector2(0.5, 0.5) +texture_normal = ExtResource("3_37rne") + +[connection signal="pressed" from="Buttons/Boost" to="." method="_on_boost_pressed"] +[connection signal="released" from="Buttons/Boost" to="." method="_on_boost_released"] +[connection signal="pressed" from="Buttons/Interact" to="." method="_on_interact_pressed"] +[connection signal="released" from="Buttons/Interact" to="." method="_on_interact_released"] |