[gd_scene load_steps=7 format=3 uid="uid://cnqmbq84hbnvj"] [ext_resource type="Texture2D" uid="uid://cmjre2dn67avi" path="res://assets/textures/spikes/spikes.png" id="1_hxbnl"] [ext_resource type="Script" uid="uid://dbw7xk3snsxna" path="res://objects/spikes/spikes.gd" id="1_sx6gd"] [sub_resource type="Animation" id="Animation_owgdn"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [0] } [sub_resource type="Animation" id="Animation_iol55"] resource_name = "spike" length = 0.2 loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.0333333, 0.0666667, 0.1, 0.133333, 0.166667, 0.2), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), "update": 1, "values": [0, 1, 2, 1, 3, 4, 3] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_7km18"] _data = { &"RESET": SubResource("Animation_owgdn"), &"spike": SubResource("Animation_iol55") } [sub_resource type="RectangleShape2D" id="RectangleShape2D_1d2d3"] size = Vector2(12, 12) [node name="Spikes" type="Node2D"] script = ExtResource("1_sx6gd") [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("1_hxbnl") hframes = 5 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { "": SubResource("AnimationLibrary_7km18") } autoplay = "spike" [node name="Area2D" type="Area2D" parent="."] collision_mask = 16 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2(0, 1) shape = SubResource("RectangleShape2D_1d2d3") [connection signal="body_shape_entered" from="Area2D" to="." method="_on_area_2d_body_shape_entered"]