ld56/Scenes/Button/button.tscn

119 lines
3.1 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=10 format=3 uid="uid://bhvihrt8dipll"]
2024-10-05 10:39:19 +00:00
[ext_resource type="Script" path="res://Scenes/Button/button.gd" id="1_fkyus"]
[ext_resource type="Texture2D" uid="uid://q85jhjrqsrxk" path="res://Assets/Buttons/Idle.png" id="2_01nlj"]
[ext_resource type="Texture2D" uid="uid://blatwufdrwqml" path="res://Assets/Buttons/PressedIn1.png" id="3_180hi"]
[ext_resource type="Texture2D" uid="uid://4c7qtuk0exng" path="res://Assets/Buttons/FullPressed.png" id="4_5m7c4"]
[ext_resource type="Texture2D" uid="uid://ncd65m8iq7l0" path="res://Assets/Buttons/PressedOut.png" id="5_3xqo8"]
[ext_resource type="Texture2D" uid="uid://chckt1ppwsjq" path="res://Assets/Buttons/FORBIDDEN.png" id="6_p5821"]
[ext_resource type="Texture2D" uid="uid://cw6je7hakttbq" path="res://Assets/Buttons/ERROR.png" id="7_3w6j8"]
2024-10-05 10:39:19 +00:00
[sub_resource type="SpriteFrames" id="SpriteFrames_leuex"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_01nlj")
2024-10-05 10:39:19 +00:00
}],
"loop": false,
"name": &"default",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_180hi")
}, {
"duration": 3.0,
"texture": ExtResource("4_5m7c4")
}, {
"duration": 1.0,
"texture": ExtResource("5_3xqo8")
2024-10-05 10:39:19 +00:00
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
2024-10-05 10:39:19 +00:00
}],
"loop": false,
"name": &"pressed",
"speed": 15.0
2024-10-05 20:09:04 +00:00
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("6_p5821")
}],
"loop": true,
"name": &"red",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}, {
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}, {
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}, {
"duration": 1.0,
"texture": ExtResource("6_p5821")
}],
"loop": false,
"name": &"red_in",
"speed": 3.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}, {
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}, {
"duration": 1.0,
"texture": ExtResource("7_3w6j8")
}, {
"duration": 1.0,
"texture": ExtResource("2_01nlj")
}],
"loop": false,
"name": &"red_out",
"speed": 3.0
2024-10-05 10:39:19 +00:00
}]
2024-10-05 20:09:04 +00:00
[sub_resource type="CircleShape2D" id="CircleShape2D_l0l4p"]
radius = 10.4089
2024-10-05 10:39:19 +00:00
2024-10-05 20:09:04 +00:00
[node name="Button" type="Node2D"]
script = ExtResource("1_fkyus")
metadata/_edit_group_ = true
2024-10-05 10:39:19 +00:00
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(1.38, 1.316)
2024-10-05 10:39:19 +00:00
sprite_frames = SubResource("SpriteFrames_leuex")
2024-10-05 20:09:04 +00:00
[node name="Area2D" type="Area2D" parent="."]
scale = Vector2(1.21306, 1.21306)
collision_layer = 2
collision_mask = 2
2024-10-05 10:39:19 +00:00
2024-10-05 20:09:04 +00:00
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
scale = Vector2(4.74125, 4.84)
shape = SubResource("CircleShape2D_l0l4p")
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
2024-10-05 20:09:04 +00:00
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
[connection signal="area_exited" from="Area2D" to="." method="_on_area_2d_area_exited"]