[gd_scene load_steps=5 format=2] [ext_resource path="res://assets/Traps/trap_suspended_anim_strip_18.png" type="Texture" id=1] [ext_resource path="res://src/Hazards/SwingingSpike.gd" type="Script" id=2] [sub_resource type="Animation" id=1] resource_name = "swing" length = 1.8 loop = true tracks/0/type = "value" tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "update": 1, "values": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ] } tracks/1/type = "value" tracks/1/path = NodePath("StaticBody2D/CollisionShape2D:position") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "update": 1, "values": [ Vector2( -0.187294, 15.5449 ), Vector2( 11.6119, 12.7356 ), Vector2( 20.8441, 8.03137 ), Vector2( 26.6466, -1.42532 ), Vector2( 26.7305, -3.29058 ), Vector2( 26.7305, -3.29058 ), Vector2( 26.6466, -1.42532 ), Vector2( 20.4774, 7.10583 ), Vector2( 11.4818, 12.3679 ), Vector2( 0.201323, 15.3077 ), Vector2( -12.0156, 12.5247 ), Vector2( -21.2125, 7.47087 ), Vector2( -25.8877, -1.30197 ), Vector2( -27.7848, -3.92551 ), Vector2( -27.7848, -3.92551 ), Vector2( -26.6914, -1.49265 ), Vector2( -21.0406, 7.18316 ), Vector2( -10.9885, 12.8624 ) ] } tracks/2/type = "value" tracks/2/path = NodePath("StaticBody2D/CollisionShape2D:rotation_degrees") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { "times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "update": 1, "values": [ 0.0, -26.0, -45.0, -60.0, -65.0, -65.0, -60.0, -45.0, -25.0, 0.0, 20.0, 45.0, 60.0, 65.0, 65.0, 60.0, 45.0, 22.5 ] } [sub_resource type="RectangleShape2D" id=2] extents = Vector2( 9.90336, 14.8331 ) [node name="SwingingSpike" type="Node2D"] script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) hframes = 18 frame = 9 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "swing" anims/swing = SubResource( 1 ) [node name="StaticBody2D" type="Area2D" parent="."] collision_layer = 4 [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] position = Vector2( 0.201323, 15.3077 ) scale = Vector2( 1, 1 ) shape = SubResource( 2 ) [connection signal="body_entered" from="StaticBody2D" to="." method="_on_StaticBody2D_body_entered"]