[gd_scene load_steps=7 format=2] [ext_resource path="res://graphics/enemy/snail.png" type="Texture" id=2] [ext_resource path="res://objects/enemy/enemy_speedup_in_range.gd" type="Script" id=3] [sub_resource type="AtlasTexture" id=2] atlas = ExtResource( 2 ) region = Rect2( 0, 0, 12, 11 ) [sub_resource type="AtlasTexture" id=3] atlas = ExtResource( 2 ) region = Rect2( 12, 0, 12, 11 ) [sub_resource type="SpriteFrames" id=4] animations = [ { "frames": [ SubResource( 2 ), SubResource( 3 ) ], "loop": true, "name": "default", "speed": 5.0 } ] [sub_resource type="RectangleShape2D" id=5] extents = Vector2( 4, 4 ) [node name="Snail" type="Node2D" groups=["enemy"]] script = ExtResource( 3 ) score_for_killing = 30 slower_speed = 30 faster_speed = 60 [node name="AnimatedSprite" type="AnimatedSprite" parent="."] position = Vector2( 3, 3 ) frames = SubResource( 4 ) playing = true [node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]] [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2( 4, 4 ) shape = SubResource( 5 ) [node name="RayCast2D" type="RayCast2D" parent="Hitbox"] position = Vector2( 0, 4 ) enabled = true cast_to = Vector2( 32, 0 ) collision_mask = 8 collide_with_areas = true [node name="Timer" type="Timer" parent="."] wait_time = 0.5 one_shot = true [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]