summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Objects/Button.tscn
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-05-03 09:32:22 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-05-03 09:32:22 +0200
commit516d22c1737a9c94026b5ff0c9856bc5549aa416 (patch)
treecd9ef3089d1c8bdfc440b5673f7ad0d0dce787a9 /Scenes/Entities/Objects/Button.tscn
parentd192b1546ab39180cdc28d2621c117539e3d26d6 (diff)
update
Diffstat (limited to 'Scenes/Entities/Objects/Button.tscn')
-rw-r--r--Scenes/Entities/Objects/Button.tscn50
1 files changed, 50 insertions, 0 deletions
diff --git a/Scenes/Entities/Objects/Button.tscn b/Scenes/Entities/Objects/Button.tscn
new file mode 100644
index 0000000..0416167
--- /dev/null
+++ b/Scenes/Entities/Objects/Button.tscn
@@ -0,0 +1,50 @@
+[gd_scene load_steps=7 format=3 uid="uid://8fbkdifli6ic"]
+
+[ext_resource type="Script" path="res://Scenes/Entities/Objects/Button.gd" id="1_83jjd"]
+[ext_resource type="Texture2D" uid="uid://b6ce2eihxulqb" path="res://Assets/Stages/core_set pieces.png" id="2_frejs"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_xgggr"]
+size = Vector2(12, 7)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_t47kb"]
+atlas = ExtResource("2_frejs")
+region = Rect2(272, 512, 16, 16)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_6om1g"]
+atlas = ExtResource("2_frejs")
+region = Rect2(288, 512, 16, 16)
+
+[sub_resource type="SpriteFrames" id="SpriteFrames_moi56"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_t47kb")
+}],
+"loop": false,
+"name": &"default",
+"speed": 1.0
+}, {
+"frames": [{
+"duration": 1.0,
+"texture": SubResource("AtlasTexture_6om1g")
+}],
+"loop": false,
+"name": &"pressed",
+"speed": 1.0
+}]
+
+[node name="Button" type="Area2D"]
+z_index = -1
+collision_layer = 64
+collision_mask = 2
+script = ExtResource("1_83jjd")
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+position = Vector2(0, 1.5)
+shape = SubResource("RectangleShape2D_xgggr")
+
+[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
+texture_filter = 1
+sprite_frames = SubResource("SpriteFrames_moi56")
+
+[connection signal="body_entered" from="." to="." method="_on_body_entered"]