Files
CoinFoxAdventure/scenes/Game/Enemy/enemy.tscn
2024-10-28 10:25:07 +01:00

148 lines
4.6 KiB
Plaintext

[gd_scene load_steps=20 format=3 uid="uid://cwwrv2mwnu2q3"]
[ext_resource type="Texture2D" uid="uid://dqcyw3f15vsiq" path="res://assets/Sunny Land Collection Files/Sunny Land Collection Files/Assets/Characters/Players/Fiery Imp/hurt/hurt-sheet.png" id="1_t1n78"]
[ext_resource type="Script" path="res://scenes/Game/Enemy/enemy.gd" id="1_xbhdf"]
[ext_resource type="Texture2D" uid="uid://duhulhqkla6ar" path="res://assets/Sunny Land Collection Files/Sunny Land Collection Files/Assets/Characters/Players/Fiery Imp/idle/idle-preview.png" id="2_bhei3"]
[ext_resource type="Texture2D" uid="uid://15wural1fsr6" path="res://assets/Sunny Land Collection Files/Sunny Land Collection Files/Assets/Characters/Players/Fiery Imp/jump/jump-preview.png" id="3_omigw"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_24tgy"]
radius = 8.0
height = 26.0
[sub_resource type="AtlasTexture" id="AtlasTexture_jmn8m"]
atlas = ExtResource("1_t1n78")
region = Rect2(0, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_168ap"]
atlas = ExtResource("1_t1n78")
region = Rect2(51, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_q0wcd"]
atlas = ExtResource("2_bhei3")
region = Rect2(0, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_5djji"]
atlas = ExtResource("2_bhei3")
region = Rect2(51, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_v7g0l"]
atlas = ExtResource("2_bhei3")
region = Rect2(102, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_pl311"]
atlas = ExtResource("2_bhei3")
region = Rect2(153, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_neu2a"]
atlas = ExtResource("3_omigw")
region = Rect2(0, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_fm5fc"]
atlas = ExtResource("3_omigw")
region = Rect2(51, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_tnvti"]
atlas = ExtResource("3_omigw")
region = Rect2(102, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_mmuno"]
atlas = ExtResource("3_omigw")
region = Rect2(153, 0, 51, 45)
[sub_resource type="AtlasTexture" id="AtlasTexture_lh0nl"]
atlas = ExtResource("3_omigw")
region = Rect2(204, 0, 51, 45)
[sub_resource type="SpriteFrames" id="SpriteFrames_hpwl4"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jmn8m")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_168ap")
}],
"loop": true,
"name": &"death",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_q0wcd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5djji")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v7g0l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pl311")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_neu2a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fm5fc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tnvti")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mmuno")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lh0nl")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_5ntll"]
radius = 156.003
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_o6lk6"]
height = 34.0
[node name="enemy" type="CharacterBody2D"]
script = ExtResource("1_xbhdf")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -13)
shape = SubResource("CapsuleShape2D_24tgy")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -23)
sprite_frames = SubResource("SpriteFrames_hpwl4")
animation = &"death"
autoplay = "idle"
frame_progress = 0.760876
[node name="PlayerDetection" type="Area2D" parent="."]
visible = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerDetection"]
position = Vector2(0, -10)
shape = SubResource("CircleShape2D_5ntll")
[node name="killingzone" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="killingzone"]
position = Vector2(0, -12)
shape = SubResource("CapsuleShape2D_o6lk6")
debug_color = Color(0.987816, 0.0454308, 0.255515, 0.42)
[node name="Deathcounter" type="Timer" parent="."]
wait_time = 2.0
[connection signal="body_entered" from="PlayerDetection" to="." method="_on_player_detection_body_entered"]
[connection signal="body_exited" from="PlayerDetection" to="." method="_on_player_detection_body_exited"]
[connection signal="body_entered" from="killingzone" to="." method="_on_killingzone_body_entered"]
[connection signal="timeout" from="Deathcounter" to="." method="_on_timer_timeout"]