Enemy spawning

This commit is contained in:
Marco 2025-06-21 16:44:44 +02:00
commit 29dc9bebe0
20 changed files with 564 additions and 105 deletions

View file

@ -24,7 +24,7 @@ height = 0.935884
height = 1.91858
radius = 3.04834
[node name="FairyGuardFsm" type="CharacterBody3D" node_paths=PackedStringArray("EnemyFSM")]
[node name="Enemy" type="CharacterBody3D" node_paths=PackedStringArray("EnemyFSM")]
collision_layer = 64
collision_mask = 17
script = ExtResource("1_a3crc")
@ -74,13 +74,14 @@ script = ExtResource("9_dm2sd")
Storage = NodePath("../../Storage")
_moduleNodes = [NodePath("")]
[node name="AnimatedSprite2D" type="AnimatedSprite3D" parent="."]
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="." node_paths=PackedStringArray("EnemyProxy")]
pixel_size = 0.05
billboard = 1
texture_filter = 0
sprite_frames = ExtResource("10_hew1j")
animation = &"down"
script = ExtResource("11_jgarc")
EnemyProxy = NodePath("..")
[node name="Storage" type="Node" parent="." node_paths=PackedStringArray("Root")]
script = ExtResource("11_xne4s")

View file

@ -0,0 +1,29 @@
[gd_scene load_steps=4 format=3 uid="uid://c133312rx63ps"]
[ext_resource type="Script" uid="uid://cg6y36s7buapp" path="res://Scripts/Weapons/Bullet3D.cs" id="1_ojpd6"]
[ext_resource type="Texture2D" uid="uid://bdyd0bht18n47" path="res://Sprites/EnemyProjectile.png" id="2_ojpd6"]
[sub_resource type="SphereShape3D" id="SphereShape3D_pklkt"]
radius = 0.083358
[node name="Bullet" type="Area3D" groups=["bullets"]]
collision_layer = 128
collision_mask = 23
script = ExtResource("1_ojpd6")
Speed = 200.0
metadata/_edit_group_ = true
[node name="Sprite" type="Sprite3D" parent="."]
pixel_size = 0.05
billboard = 1
texture_filter = 0
texture = ExtResource("2_ojpd6")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_pklkt")
[node name="VisibleOnScreenNotifier" type="VisibleOnScreenNotifier3D" parent="."]
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]