108 lines
3.1 KiB
Plaintext
108 lines
3.1 KiB
Plaintext
[gd_scene load_steps=14 format=3 uid="uid://b7u8v7hd6r25t"]
|
|
|
|
[ext_resource type="Script" path="res://Script/enemy.gd" id="1_vt83b"]
|
|
[ext_resource type="Texture2D" uid="uid://u7l68shosmv4" path="res://Asset/doc.png" id="2_xt0ur"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pxjqy"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(64, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_wo5d2"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(80, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lg048"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(96, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fg5px"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(112, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aw0hr"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(0, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vlsym"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(16, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xcfrc"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(32, 0, 16, 32)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_q0obh"]
|
|
atlas = ExtResource("2_xt0ur")
|
|
region = Rect2(48, 0, 16, 32)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_fwej1"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_pxjqy")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_wo5d2")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_lg048")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_fg5px")
|
|
}],
|
|
"loop": true,
|
|
"name": &"EnemyMoove",
|
|
"speed": 9.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_aw0hr")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_vlsym")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_xcfrc")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_q0obh")
|
|
}],
|
|
"loop": true,
|
|
"name": &"EnemyStatic",
|
|
"speed": 7.0
|
|
}]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_kbala"]
|
|
radius = 61.0082
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_52a2m"]
|
|
radius = 7.0
|
|
|
|
[node name="enemy" type="CharacterBody2D"]
|
|
position = Vector2(0, -30)
|
|
script = ExtResource("1_vt83b")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
sprite_frames = SubResource("SpriteFrames_fwej1")
|
|
animation = &"EnemyStatic"
|
|
frame = 1
|
|
frame_progress = 0.968803
|
|
offset = Vector2(0, -3)
|
|
|
|
[node name="detection_area" type="Area2D" parent="."]
|
|
collision_layer = 2
|
|
collision_mask = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="detection_area"]
|
|
position = Vector2(0, 8)
|
|
shape = SubResource("CircleShape2D_kbala")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(0, 6)
|
|
shape = SubResource("CircleShape2D_52a2m")
|
|
|
|
[connection signal="body_entered" from="detection_area" to="." method="_on_detection_area_body_entered"]
|
|
[connection signal="body_entered" from="detection_area" to="." method="_on_detection_area_2d_body_entered"]
|
|
[connection signal="body_exited" from="detection_area" to="." method="_on_detection_area_2d_body_exited"]
|
|
[connection signal="body_exited" from="detection_area" to="." method="_on_detection_area_body_exited"]
|