cirnogodot/Scenes/Enemy.tscn

104 lines
3.7 KiB
Text
Raw Permalink Normal View History

2025-02-09 23:20:49 +01:00
[gd_scene load_steps=14 format=3 uid="uid://v8s3kubgb2qg"]
2024-08-17 17:00:50 +02:00
2025-02-24 11:37:45 +01:00
[ext_resource type="Script" uid="uid://cble6kwcr7cvi" path="res://Scripts/Enemy.cs" id="1_lpwdj"]
2025-02-07 13:51:31 +01:00
[ext_resource type="Texture2D" uid="uid://buwohektt3k00" path="res://Sprites/Actors/Robot1.png" id="2_hqnpo"]
2024-08-17 17:00:50 +02:00
[ext_resource type="PackedScene" uid="uid://cuixq5ex0j40h" path="res://Scenes/enemyBullet.tscn" id="2_ogldd"]
2025-02-24 11:37:45 +01:00
[ext_resource type="Script" uid="uid://c4qmuxjhheahr" path="res://Scripts/Components/ProximityPlayerDetection.cs" id="3_1nqn5"]
2024-11-15 16:32:26 +01:00
[ext_resource type="PackedScene" uid="uid://crry0rgk7a8sm" path="res://Scenes/Weapons/BaseWeapon.tscn" id="4_2k1dv"]
2025-02-09 23:20:49 +01:00
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="5_ieij6"]
2024-08-17 17:00:50 +02:00
2025-02-07 13:51:31 +01:00
[sub_resource type="AtlasTexture" id="AtlasTexture_d7fe2"]
atlas = ExtResource("2_hqnpo")
region = Rect2(0, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_r6ku6"]
atlas = ExtResource("2_hqnpo")
region = Rect2(16, 0, 16, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_xl1qg"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_d7fe2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r6ku6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
2024-08-17 17:00:50 +02:00
[sub_resource type="CircleShape2D" id="CircleShape2D_8gtts"]
radius = 7.0
[sub_resource type="CircleShape2D" id="CircleShape2D_cacb5"]
radius = 4.0
[sub_resource type="CircleShape2D" id="CircleShape2D_v711r"]
radius = 85.0529
2025-01-31 16:06:15 +01:00
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m1rsg"]
size = Vector2(8, 12)
[node name="Enemy" type="CharacterBody2D" node_paths=PackedStringArray("EquippedWeapon", "_playerDetection") groups=["Destroyable"]]
2024-08-17 17:00:50 +02:00
collision_layer = 16
2024-08-18 11:33:17 +02:00
collision_mask = 9
2024-08-17 17:00:50 +02:00
script = ExtResource("1_lpwdj")
2025-02-11 17:55:50 +01:00
Health = 6.0
2024-11-15 16:32:26 +01:00
EquippedWeapon = NodePath("Weapon")
_playerDetection = NodePath("PlayerDetection")
2025-02-04 13:22:05 +01:00
_navigationEnabled = true
2024-08-17 17:00:50 +02:00
metadata/_edit_group_ = true
2025-02-07 13:51:31 +01:00
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_xl1qg")
frame_progress = 0.280415
2024-08-17 17:00:50 +02:00
2024-08-18 11:33:17 +02:00
[node name="Damage_HitBox" type="CollisionShape2D" parent="."]
2025-01-21 22:07:34 +01:00
visible = false
2024-08-17 17:00:50 +02:00
shape = SubResource("CircleShape2D_8gtts")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
2025-01-31 16:06:15 +01:00
collision_layer = 16
2024-08-17 17:00:50 +02:00
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
2025-01-21 22:07:34 +01:00
visible = false
2024-08-17 17:00:50 +02:00
position = Vector2(0, 5)
shape = SubResource("CircleShape2D_cacb5")
[node name="PlayerDetection" type="Area2D" parent="."]
2025-01-31 17:43:17 +01:00
visible = false
2024-08-17 17:00:50 +02:00
collision_layer = 16
collision_mask = 2
script = ExtResource("3_1nqn5")
2024-08-17 17:00:50 +02:00
[node name="PlayerDetectionArea" type="CollisionShape2D" parent="PlayerDetection"]
shape = SubResource("CircleShape2D_v711r")
2024-08-18 11:33:17 +02:00
[node name="ShootTimer" type="Timer" parent="."]
wait_time = 0.4
one_shot = true
2024-11-15 16:32:26 +01:00
[node name="Weapon" parent="." instance=ExtResource("4_2k1dv")]
2025-02-09 23:20:49 +01:00
WeaponData = ExtResource("5_ieij6")
2024-11-15 16:32:26 +01:00
BulletScene = ExtResource("2_ogldd")
2025-01-24 15:24:37 +01:00
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
2025-01-31 15:05:45 +01:00
target_desired_distance = 64.0
path_max_distance = 800.0
path_postprocessing = 1
2025-01-31 17:43:17 +01:00
avoidance_enabled = true
2025-01-31 15:05:45 +01:00
debug_path_custom_color = Color(1, 0, 0, 1)
2025-01-24 15:24:37 +01:00
2025-01-31 16:06:15 +01:00
[node name="DamageHitbox" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 9
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageHitbox"]
shape = SubResource("RectangleShape2D_m1rsg")
[connection signal="area_entered" from="PlayerDetection" to="PlayerDetection" method="_on_area_entered"]
[connection signal="area_exited" from="PlayerDetection" to="PlayerDetection" method="_on_area_exited"]
2025-01-31 15:05:45 +01:00
[connection signal="velocity_computed" from="NavigationAgent2D" to="." method="_on_navigation_agent_2d_velocity_computed"]
2025-01-31 16:06:15 +01:00
[connection signal="area_entered" from="DamageHitbox" to="." method="_on_damage_hitbox_area_entered"]