[gd_scene load_steps=18 format=2] [ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1] [ext_resource path="res://graphics/enemy/skelarcher_shoot.png" type="Texture" id=2] [ext_resource path="res://graphics/enemy/skelarcher_idle.png" type="Texture" id=3] [ext_resource path="res://objects/enemy/skelarcher.gd" type="Script" id=4] [sub_resource type="ShaderMaterial" id=18] shader = ExtResource( 1 ) shader_param/border_color = Color( 0, 0, 0, 1 ) shader_param/border_corners = true [sub_resource type="ShaderMaterial" id=1] shader = ExtResource( 1 ) shader_param/border_color = Color( 0, 0, 0, 1 ) shader_param/border_corners = true [sub_resource type="AtlasTexture" id=11] atlas = ExtResource( 2 ) region = Rect2( 0, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=12] atlas = ExtResource( 2 ) region = Rect2( 19, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=13] atlas = ExtResource( 2 ) region = Rect2( 38, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=14] atlas = ExtResource( 2 ) region = Rect2( 57, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=15] atlas = ExtResource( 2 ) region = Rect2( 76, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=16] atlas = ExtResource( 2 ) region = Rect2( 95, 0, 19, 20 ) [sub_resource type="AtlasTexture" id=17] atlas = ExtResource( 2 ) region = Rect2( 114, 0, 19, 20 ) [sub_resource type="SpriteFrames" id=9] animations = [ { "frames": [ ExtResource( 3 ) ], "loop": true, "name": "idle", "speed": 5.0 }, { "frames": [ SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ) ], "loop": false, "name": "shoot", "speed": 15.0 } ] [sub_resource type="RectangleShape2D" id=10] extents = Vector2( 4, 4 ) [sub_resource type="Animation" id=19] resource_name = "idle" tracks/0/type = "value" tracks/0/path = NodePath("Sprite:region_rect") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), "update": 0, "values": [ Rect2( 0, 0, 19, 20 ) ] } tracks/1/type = "value" tracks/1/path = NodePath("Sprite:texture") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), "update": 1, "values": [ ExtResource( 2 ) ] } [sub_resource type="Animation" id=20] resource_name = "shoot" length = 0.5 step = 0.06 tracks/0/type = "value" tracks/0/path = NodePath("Sprite:region_rect") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.06, 0.12, 0.24, 0.3, 0.36, 0.42 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), "update": 1, "values": [ Rect2( 0, 0, 19, 20 ), Rect2( 19, 0, 19, 20 ), Rect2( 38, 0, 19, 20 ), Rect2( 76, 0, 19, 20 ), Rect2( 95, 0, 19, 20 ), Rect2( 114, 0, 19, 20 ), Rect2( 133, 0, 19, 20 ) ] } tracks/1/type = "value" tracks/1/path = NodePath("Sprite:texture") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), "update": 1, "values": [ ExtResource( 2 ) ] } tracks/2/type = "value" tracks/2/path = NodePath("AnimationPlayer:current_animation") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { "times": PoolRealArray( 0.48 ), "transitions": PoolRealArray( 1 ), "update": 2, "values": [ "idle" ] } tracks/3/type = "method" tracks/3/path = NodePath(".") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/imported = false tracks/3/enabled = true tracks/3/keys = { "times": PoolRealArray( 0.24 ), "transitions": PoolRealArray( 1 ), "values": [ { "args": [ ], "method": "spawn_arrow" } ] } [node name="Skelarcher" type="Node2D" groups=["enemy"]] script = ExtResource( 4 ) shoot_time = 3.0 [node name="Sprite" type="Sprite" parent="."] material = SubResource( 18 ) texture = ExtResource( 2 ) region_enabled = true region_rect = Rect2( 0, 0, 19, 20 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] visible = false material = SubResource( 1 ) frames = SubResource( 9 ) animation = "idle" playing = true [node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]] [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] position = Vector2( -1, 6 ) shape = SubResource( 10 ) [node name="Timer" type="Timer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/idle = SubResource( 19 ) anims/shoot = SubResource( 20 ) [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]