[gd_scene load_steps=34 format=2] [ext_resource path="res://src/templates/Actor/ActorTemplate.tscn" type="PackedScene" id=1] [ext_resource path="res://src/enemyC/enemyC_movement_component.gd" type="Script" id=2] [ext_resource path="res://src/enemyC/attack.gd" type="Script" id=3] [ext_resource path="res://src/components/Hitbox_Component.tscn" type="PackedScene" id=4] [ext_resource path="res://src/components/GenericSender.tscn" type="PackedScene" id=5] [ext_resource path="res://src/enemyC/EnemyC.gd" type="Script" id=6] [ext_resource path="res://src/components/Health_Component.tscn" type="PackedScene" id=7] [ext_resource path="res://src/enemyC/states/hurt.gd" type="Script" id=8] [ext_resource path="res://src/state_animated_actor.gd" type="Script" id=9] [sub_resource type="StreamTexture" id=1] load_path = "res://.import/botEnemy.png-46efd539a38730ff15fb4ddb087329c6.stex" [sub_resource type="AtlasTexture" id=2] atlas = SubResource( 1 ) region = Rect2( 192, 48, 48, 48 ) [sub_resource type="AtlasTexture" id=3] atlas = SubResource( 1 ) region = Rect2( 0, 96, 48, 48 ) [sub_resource type="AtlasTexture" id=4] atlas = SubResource( 1 ) region = Rect2( 48, 96, 48, 48 ) [sub_resource type="AtlasTexture" id=5] atlas = SubResource( 1 ) region = Rect2( 96, 96, 48, 48 ) [sub_resource type="AtlasTexture" id=6] atlas = SubResource( 1 ) region = Rect2( 144, 96, 48, 48 ) [sub_resource type="AtlasTexture" id=7] atlas = SubResource( 1 ) region = Rect2( 0, 144, 48, 48 ) [sub_resource type="AtlasTexture" id=8] atlas = SubResource( 1 ) region = Rect2( 48, 144, 48, 48 ) [sub_resource type="AtlasTexture" id=9] atlas = SubResource( 1 ) region = Rect2( 96, 144, 48, 48 ) [sub_resource type="AtlasTexture" id=10] atlas = SubResource( 1 ) region = Rect2( 192, 96, 48, 48 ) [sub_resource type="AtlasTexture" id=11] atlas = SubResource( 1 ) region = Rect2( 0, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=12] atlas = SubResource( 1 ) region = Rect2( 48, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=13] atlas = SubResource( 1 ) region = Rect2( 96, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=14] atlas = SubResource( 1 ) region = Rect2( 144, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=15] atlas = SubResource( 1 ) region = Rect2( 192, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=16] atlas = SubResource( 1 ) region = Rect2( 0, 48, 48, 48 ) [sub_resource type="AtlasTexture" id=17] atlas = SubResource( 1 ) region = Rect2( 48, 48, 48, 48 ) [sub_resource type="AtlasTexture" id=18] atlas = SubResource( 1 ) region = Rect2( 96, 48, 48, 48 ) [sub_resource type="AtlasTexture" id=19] atlas = SubResource( 1 ) region = Rect2( 144, 48, 48, 48 ) [sub_resource type="SpriteFrames" id=20] animations = [ { "frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], "loop": true, "name": "attack", "speed": 10.0 }, { "frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ], "loop": false, "name": "death", "speed": 10.0 }, { "frames": [ SubResource( 10 ) ], "loop": true, "name": "hurt", "speed": 10.0 }, { "frames": [ SubResource( 11 ), SubResource( 12 ), SubResource( 13 ) ], "loop": true, "name": "idle", "speed": 10.0 }, { "frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ) ], "loop": true, "name": "walk", "speed": 10.0 } ] [sub_resource type="RectangleShape2D" id=22] extents = Vector2( 10, 16 ) [sub_resource type="RectangleShape2D" id=23] extents = Vector2( 9, 3.5 ) [sub_resource type="CapsuleShape2D" id=24] height = 10.0 [sub_resource type="RectangleShape2D" id=25] extents = Vector2( 10.5, 17.5 ) [node name="EnemyC" instance=ExtResource( 1 )] script = ExtResource( 6 ) actor_type = "Enemy" [node name="AnimatedSprite" parent="." index="0"] position = Vector2( 11, -7 ) frames = SubResource( 20 ) animation = "idle" frame = 2 __meta__ = { "_aseprite_wizard_config_": { "layer": "", "o_ex_p": "", "o_folder": "res://assets", "o_name": "", "only_visible": true, "op_exp": false, "slice": "", "source": "E:/Godot/Art/botEnemy.aseprite" } } [node name="movement_component" parent="." index="1"] script = ExtResource( 2 ) [node name="IdleTimeout" type="Timer" parent="movement_component" index="0"] wait_time = 2.0 one_shot = true autostart = true [node name="idle" parent="movement_state_machine" index="0"] animation_sequence = [ "idle" ] [node name="fall" parent="movement_state_machine" index="1"] animation_sequence = [ "idle" ] [node name="attack" type="Node" parent="movement_state_machine" index="2"] script = ExtResource( 3 ) debug_state = true timeout_seconds = 2.0 animation_sequence = [ "attack" ] emitter_frame_subscriptions = { 0: "attack", 2: "attack" } fall_node = NodePath("../fall") idle_node = NodePath("../idle") [node name="move" parent="movement_state_machine" index="3"] animation_sequence = [ "walk" ] [node name="hurt" type="Node" parent="movement_state_machine" index="4"] script = ExtResource( 8 ) timeout_seconds = 1.0 move_speed = -5.0 animation_sequence = [ "hurt" ] idle_node = NodePath("../idle") [node name="die" type="Node" parent="movement_state_machine" index="5"] script = ExtResource( 9 ) timeout_seconds = 0.5 move_speed = -5.0 animation_sequence = [ "death" ] [node name="Hurtbox_Component" parent="." index="3"] hurtbox_entered_function = "enemyHit" [node name="CollisionShape2D" parent="Hurtbox_Component" index="0"] position = Vector2( -1, -2 ) shape = SubResource( 22 ) [node name="EdgeDetection" type="RayCast2D" parent="." index="5"] modulate = Color( 0.054902, 1, 0, 1 ) show_behind_parent = true position = Vector2( 15, 3 ) enabled = true cast_to = Vector2( 0, 17 ) collide_with_areas = true [node name="PlayerDetection" type="RayCast2D" parent="." index="6"] enabled = true cast_to = Vector2( 21, 0 ) collision_mask = 2 [node name="Hitbox_Component" parent="." index="7" instance=ExtResource( 4 )] damage_amount = 10 [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox_Component" index="0"] modulate = Color( 1, 0.596078, 0.121569, 1 ) position = Vector2( 18, -8.5 ) shape = SubResource( 23 ) disabled = true [node name="GenericSender" parent="." index="8" instance=ExtResource( 5 )] receiver_node_name = "GenericReceiver" [node name="CollisionShape2D" type="CollisionShape2D" parent="GenericSender" index="0"] position = Vector2( 48, 0 ) shape = SubResource( 24 ) [node name="Health_Component" parent="." index="9" instance=ExtResource( 7 )] max_health = 20 [node name="CollisionShape2D" type="CollisionShape2D" parent="." index="10"] position = Vector2( -0.5, -1.5 ) shape = SubResource( 25 ) [connection signal="frame_reached" from="movement_state_machine/attack" to="." method="_on_attack_frame_reached"] [connection signal="state_exited" from="movement_state_machine/attack" to="." method="_on_attack_state_exited"] [connection signal="health_depleted" from="Health_Component" to="." method="_on_Health_Component_health_depleted"]