feat: add puzzleButton node; add logic and collisions to it;
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
[gd_scene format=3 uid="uid://onpen57mc6i8"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c0v63n2kjtvvu" path="res://Ninja Adventure - Asset Pack/Backgrounds/Tilesets/TilesetDungeon.png" id="1_4jafl"]
|
||||
[ext_resource type="Script" uid="uid://cdoeb8xo16tpb" path="res://Scenes/PuzzleButton/puzzle_button.gd" id="1_dls00"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_chgu2"]
|
||||
size = Vector2(14, 12)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dls00"]
|
||||
atlas = ExtResource("1_4jafl")
|
||||
region = Rect2(16, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lffmm"]
|
||||
atlas = ExtResource("1_4jafl")
|
||||
region = Rect2(0, 16, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_chgu2"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dls00")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"pressed",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lffmm")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"unpressed",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="PuzzleButton" type="Area2D" unique_id=125477561]
|
||||
script = ExtResource("1_dls00")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=389969783]
|
||||
shape = SubResource("RectangleShape2D_chgu2")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1705118892]
|
||||
sprite_frames = SubResource("SpriteFrames_chgu2")
|
||||
animation = &"unpressed"
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
|
||||
Reference in New Issue
Block a user