[gd_scene load_steps=12 format=2] [ext_resource path="res://graphics/enemy/snake.png" type="Texture" id=1] [ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=2] [ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=3] [ext_resource path="res://graphics/enemy/robosnake.png" type="Texture" id=4] [sub_resource type="ShaderMaterial" id=1] shader = ExtResource( 2 ) shader_param/border_color = Color( 0, 0, 0, 1 ) shader_param/border_corners = false [sub_resource type="AtlasTexture" id=2] atlas = ExtResource( 1 ) region = Rect2( 0, 0, 16, 16 ) [sub_resource type="AtlasTexture" id=3] atlas = ExtResource( 1 ) region = Rect2( 16, 0, 16, 16 ) [sub_resource type="AtlasTexture" id=6] atlas = ExtResource( 4 ) region = Rect2( 0, 0, 16, 16 ) [sub_resource type="AtlasTexture" id=7] atlas = ExtResource( 4 ) region = Rect2( 16, 0, 16, 16 ) [sub_resource type="SpriteFrames" id=4] animations = [ { "frames": [ SubResource( 2 ), SubResource( 3 ) ], "loop": true, "name": "default", "speed": 7.0 }, { "frames": [ SubResource( 6 ), SubResource( 7 ) ], "loop": true, "name": "robo", "speed": 7.0 } ] [sub_resource type="RectangleShape2D" id=5] extents = Vector2( 4, 4 ) [node name="Snake" type="Node2D" groups=["enemy"]] script = ExtResource( 3 ) score_for_killing = 15 [node name="AnimatedSprite" type="AnimatedSprite" parent="."] material = SubResource( 1 ) frames = SubResource( 4 ) frame = 1 playing = true [node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]] [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2( 0, 4 ) shape = SubResource( 5 ) [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]