GodotWIP/Enemy.tscn

160 lines
4.0 KiB
Plaintext

[gd_scene load_steps=24 format=2]
[ext_resource path="res://Enemy-KinematicBody2D.gd" type="Script" id=1]
[sub_resource type="StreamTexture" id=75]
load_path = "res://.import/botEnemy.png-46efd539a38730ff15fb4ddb087329c6.stex"
[sub_resource type="AtlasTexture" id=76]
atlas = SubResource( 75 )
region = Rect2( 192, 48, 48, 48 )
[sub_resource type="AtlasTexture" id=77]
atlas = SubResource( 75 )
region = Rect2( 0, 96, 48, 48 )
[sub_resource type="AtlasTexture" id=78]
atlas = SubResource( 75 )
region = Rect2( 48, 96, 48, 48 )
[sub_resource type="AtlasTexture" id=79]
atlas = SubResource( 75 )
region = Rect2( 96, 96, 48, 48 )
[sub_resource type="AtlasTexture" id=80]
atlas = SubResource( 75 )
region = Rect2( 144, 96, 48, 48 )
[sub_resource type="AtlasTexture" id=81]
atlas = SubResource( 75 )
region = Rect2( 0, 144, 48, 48 )
[sub_resource type="AtlasTexture" id=82]
atlas = SubResource( 75 )
region = Rect2( 48, 144, 48, 48 )
[sub_resource type="AtlasTexture" id=83]
atlas = SubResource( 75 )
region = Rect2( 96, 144, 48, 48 )
[sub_resource type="AtlasTexture" id=84]
atlas = SubResource( 75 )
region = Rect2( 192, 96, 48, 48 )
[sub_resource type="AtlasTexture" id=85]
atlas = SubResource( 75 )
region = Rect2( 0, 0, 48, 48 )
[sub_resource type="AtlasTexture" id=86]
atlas = SubResource( 75 )
region = Rect2( 48, 0, 48, 48 )
[sub_resource type="AtlasTexture" id=87]
atlas = SubResource( 75 )
region = Rect2( 96, 0, 48, 48 )
[sub_resource type="AtlasTexture" id=88]
atlas = SubResource( 75 )
region = Rect2( 144, 0, 48, 48 )
[sub_resource type="AtlasTexture" id=89]
atlas = SubResource( 75 )
region = Rect2( 192, 0, 48, 48 )
[sub_resource type="AtlasTexture" id=90]
atlas = SubResource( 75 )
region = Rect2( 0, 48, 48, 48 )
[sub_resource type="AtlasTexture" id=91]
atlas = SubResource( 75 )
region = Rect2( 48, 48, 48, 48 )
[sub_resource type="AtlasTexture" id=92]
atlas = SubResource( 75 )
region = Rect2( 96, 48, 48, 48 )
[sub_resource type="AtlasTexture" id=93]
atlas = SubResource( 75 )
region = Rect2( 144, 48, 48, 48 )
[sub_resource type="SpriteFrames" id=94]
animations = [ {
"frames": [ SubResource( 76 ), SubResource( 77 ), SubResource( 78 ), SubResource( 79 ), SubResource( 80 ) ],
"loop": true,
"name": "attack",
"speed": 10.0
}, {
"frames": [ SubResource( 81 ), SubResource( 82 ), SubResource( 83 ) ],
"loop": true,
"name": "death",
"speed": 10.0
}, {
"frames": [ SubResource( 84 ) ],
"loop": true,
"name": "hurt",
"speed": 10.0
}, {
"frames": [ SubResource( 85 ), SubResource( 86 ), SubResource( 87 ) ],
"loop": true,
"name": "idle",
"speed": 10.0
}, {
"frames": [ SubResource( 88 ), SubResource( 89 ), SubResource( 90 ), SubResource( 91 ), SubResource( 92 ), SubResource( 93 ) ],
"loop": true,
"name": "walk",
"speed": 10.0
} ]
[sub_resource type="RectangleShape2D" id=74]
extents = Vector2( 12, 18.5 )
[sub_resource type="RectangleShape2D" id=95]
extents = Vector2( 9, 16.5 )
[node name="Enemy" type="KinematicBody2D"]
collision_layer = 4
script = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 8, -8 )
frames = SubResource( 94 )
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( -1, -3.5 )
shape = SubResource( 74 )
[node name="IdleTimeout" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[node name="PlayerDetection" type="RayCast2D" parent="."]
enabled = true
cast_to = Vector2( 20, 0 )
collision_mask = 2
[node name="HurtHitbox" type="Area2D" parent="."]
collision_layer = 160
collision_mask = 64
[node name="CollisionShape2D2" type="CollisionShape2D" parent="HurtHitbox"]
modulate = Color( 1, 0, 0, 1 )
position = Vector2( -1, -3.5 )
shape = SubResource( 95 )
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]