summaryrefslogtreecommitdiffstats
path: root/root.tscn
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-13 23:40:02 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-13 23:40:02 +0200
commita8bba44f99e100b810165375c808d5a9ff0d969d (patch)
tree8a8ffdd97b1f9b59c1158c1b0e54d939d2448291 /root.tscn
parent3851f4076c0c7f532b47674257a552325fb8e435 (diff)
Add touch buttons
Diffstat (limited to 'root.tscn')
-rw-r--r--root.tscn29
1 files changed, 28 insertions, 1 deletions
diff --git a/root.tscn b/root.tscn
index 385acb2..8dccb0c 100644
--- a/root.tscn
+++ b/root.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=5 format=4 uid="uid://cey3jxnpmommt"]
+[gd_scene load_steps=7 format=4 uid="uid://cey3jxnpmommt"]
[ext_resource type="Texture2D" uid="uid://o0yy2jkyp0dy" path="res://assets/kenney_1-bit-platformer-pack/Tilemap/monochrome_tilemap_transparent_packed.png" id="1_pyidc"]
[ext_resource type="PackedScene" uid="uid://coxnsharboouu" path="res://player.tscn" id="2_vvh5c"]
@@ -415,6 +415,12 @@ texture = ExtResource("1_pyidc")
physics_layer_0/collision_layer = 1
sources/1 = SubResource("TileSetAtlasSource_0e48y")
+[sub_resource type="Gradient" id="Gradient_pyidc"]
+colors = PackedColorArray(0, 0.9882353, 0, 1, 0, 0.9882353, 0, 1)
+
+[sub_resource type="GradientTexture1D" id="GradientTexture1D_vvh5c"]
+gradient = SubResource("Gradient_pyidc")
+
[node name="Root" type="Node2D"]
[node name="TileMapLayer" type="TileMapLayer" parent="."]
@@ -426,3 +432,24 @@ position = Vector2(74, 60)
collision_layer = 2
speed = 70.0
jump_strength = 320.0
+
+[node name="Camera2D" type="Camera2D" parent="Player"]
+position = Vector2(0, -15)
+
+[node name="TouchScreenButtonRight" type="TouchScreenButton" parent="Player/Camera2D"]
+position = Vector2(-64, 33)
+scale = Vector2(0.046874996, 11)
+texture_normal = SubResource("GradientTexture1D_vvh5c")
+action = "move_right"
+
+[node name="TouchScreenButtonJump" type="TouchScreenButton" parent="Player/Camera2D"]
+position = Vector2(72, 34)
+scale = Vector2(0.046874996, 11)
+texture_normal = SubResource("GradientTexture1D_vvh5c")
+action = "jump"
+
+[node name="TouchScreenButtonLeft" type="TouchScreenButton" parent="Player/Camera2D"]
+position = Vector2(-84, 33)
+scale = Vector2(0.046874996, 11)
+texture_normal = SubResource("GradientTexture1D_vvh5c")
+action = "move_left"