242 lines
6.9 KiB
Plaintext
242 lines
6.9 KiB
Plaintext
[gd_scene load_steps=34 format=2]
|
|
|
|
[ext_resource path="res://src/enemyB/Enemy2-KinematicBody2D.gd" type="Script" id=1]
|
|
[ext_resource path="res://src/enemyB/states/fall.gd" type="Script" id=2]
|
|
[ext_resource path="res://src/state_machine.gd" type="Script" id=3]
|
|
[ext_resource path="res://src/enemyB/states/jump.gd" type="Script" id=4]
|
|
[ext_resource path="res://src/enemyB/states/move.gd" type="Script" id=5]
|
|
[ext_resource path="res://src/enemyB/states/wander.gd" type="Script" id=6]
|
|
[ext_resource path="res://src/enemyB/states/idle.gd" type="Script" id=7]
|
|
[ext_resource path="res://src/enemyB/states/attack.gd" type="Script" id=8]
|
|
[ext_resource path="res://src/enemyB/states/hurt.gd" type="Script" id=10]
|
|
[ext_resource path="res://src/enemyB/enemy_move_component.gd" type="Script" id=11]
|
|
|
|
[sub_resource type="StreamTexture" id=149]
|
|
load_path = "res://.import/botEnemy.png-46efd539a38730ff15fb4ddb087329c6.stex"
|
|
|
|
[sub_resource type="AtlasTexture" id=150]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 192, 48, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=151]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 0, 96, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=152]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 48, 96, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=153]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 96, 96, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=154]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 144, 96, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=155]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 0, 144, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=156]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 48, 144, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=157]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 96, 144, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=158]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 192, 96, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=159]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 0, 0, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=160]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 48, 0, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=161]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 96, 0, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=162]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 144, 0, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=163]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 192, 0, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=164]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 0, 48, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=165]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 48, 48, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=166]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 96, 48, 48, 48 )
|
|
|
|
[sub_resource type="AtlasTexture" id=167]
|
|
atlas = SubResource( 149 )
|
|
region = Rect2( 144, 48, 48, 48 )
|
|
|
|
[sub_resource type="SpriteFrames" id=168]
|
|
animations = [ {
|
|
"frames": [ SubResource( 150 ), SubResource( 151 ), SubResource( 152 ), SubResource( 153 ), SubResource( 154 ) ],
|
|
"loop": true,
|
|
"name": "attack",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [ SubResource( 155 ), SubResource( 156 ), SubResource( 157 ) ],
|
|
"loop": true,
|
|
"name": "death",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [ SubResource( 158 ) ],
|
|
"loop": true,
|
|
"name": "hurt",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [ SubResource( 159 ), SubResource( 160 ), SubResource( 161 ) ],
|
|
"loop": true,
|
|
"name": "idle",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [ SubResource( 162 ), SubResource( 163 ), SubResource( 164 ), SubResource( 165 ), SubResource( 166 ), SubResource( 167 ) ],
|
|
"loop": true,
|
|
"name": "walk",
|
|
"speed": 10.0
|
|
} ]
|
|
|
|
[sub_resource type="RectangleShape2D" id=74]
|
|
extents = Vector2( 13.5, 16.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=148]
|
|
extents = Vector2( 11.5, 14.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=169]
|
|
extents = Vector2( 10, 3.5 )
|
|
|
|
[node name="Enemy" type="KinematicBody2D"]
|
|
collision_layer = 4
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
|
position = Vector2( 8, -8 )
|
|
frames = SubResource( 168 )
|
|
animation = "idle"
|
|
playing = true
|
|
flip_h = true
|
|
__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="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2( -0.5, -2.5 )
|
|
shape = SubResource( 74 )
|
|
|
|
[node name="Controllers" type="Node" parent="."]
|
|
|
|
[node name="state_machine" type="Node" parent="Controllers"]
|
|
script = ExtResource( 3 )
|
|
starting_state = NodePath("idle")
|
|
|
|
[node name="idle" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 7 )
|
|
animation_name = "idle"
|
|
timeout_seconds = 1.0
|
|
jump_node = NodePath("../jump")
|
|
fall_node = NodePath("../fall")
|
|
fire_node = NodePath("../attack")
|
|
wander_node = NodePath("../wander")
|
|
attack_node = NodePath("../attack")
|
|
|
|
[node name="jump" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 4 )
|
|
animation_name = "idle"
|
|
idle_node = NodePath("../idle")
|
|
fall_node = NodePath("../fall")
|
|
move_node = NodePath("../move")
|
|
|
|
[node name="move" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 5 )
|
|
animation_name = "walk"
|
|
jump_node = NodePath("../jump")
|
|
fall_node = NodePath("../fall")
|
|
idle_node = NodePath("../idle")
|
|
|
|
[node name="wander" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 6 )
|
|
animation_name = "walk"
|
|
timeout_seconds = 1.0
|
|
jump_node = NodePath("../jump")
|
|
fall_node = NodePath("../fall")
|
|
idle_node = NodePath("../idle")
|
|
attack_node = NodePath("../attack")
|
|
|
|
[node name="fall" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 2 )
|
|
animation_name = "idle"
|
|
idle_node = NodePath("../idle")
|
|
move_node = NodePath("../move")
|
|
|
|
[node name="hurt" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 10 )
|
|
animation_name = "hurt"
|
|
idle_node = NodePath("../idle")
|
|
|
|
[node name="attack" type="Node" parent="Controllers/state_machine"]
|
|
script = ExtResource( 8 )
|
|
animation_name = "attack"
|
|
idle_node = NodePath("../idle")
|
|
|
|
[node name="decision_component" type="Node" parent="Controllers"]
|
|
script = ExtResource( 11 )
|
|
|
|
[node name="IdleTimeout" type="Timer" parent="Controllers/decision_component"]
|
|
wait_time = 2.0
|
|
one_shot = true
|
|
autostart = true
|
|
|
|
[node name="Hurtbox" type="Area2D" parent="." groups=["enemy_hitboxes"]]
|
|
collision_layer = 160
|
|
collision_mask = 64
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
|
|
self_modulate = Color( 1, 0, 0, 1 )
|
|
position = Vector2( 0, -1 )
|
|
shape = SubResource( 148 )
|
|
|
|
[node name="PlayerDetection" type="RayCast2D" parent="."]
|
|
enabled = true
|
|
cast_to = Vector2( 20, 0 )
|
|
collision_mask = 2
|
|
|
|
[node name="Hitbox" type="Area2D" parent="."]
|
|
collision_layer = 128
|
|
collision_mask = 0
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
|
modulate = Color( 1, 0, 0, 1 )
|
|
position = Vector2( 20, -10 )
|
|
shape = SubResource( 169 )
|
|
disabled = true
|
|
|
|
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]
|
|
[connection signal="body_entered" from="Hurtbox" to="." method="_on_Hurtbox_body_entered"]
|