From 3ef1fc4df2e3178d37061ad13b5d366771193dd2 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Sun, 22 Sep 2024 20:46:38 +0100 Subject: Add enemy spawning and ability to kill enemies --- prefabs/test_arena.tscn | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'prefabs/test_arena.tscn') diff --git a/prefabs/test_arena.tscn b/prefabs/test_arena.tscn index 7bdeba8..011b517 100644 --- a/prefabs/test_arena.tscn +++ b/prefabs/test_arena.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=10 format=3 uid="uid://dlevowk0jrhlg"] +[ext_resource type="Script" path="res://scripts/dungeon_manager.gd" id="1_dbsm0"] [ext_resource type="PackedScene" uid="uid://cc1m2a1obsyn4" path="res://addons/fpc/character.tscn" id="1_vc6b5"] [ext_resource type="Script" path="res://scripts/player.gd" id="2_puqns"] -[ext_resource type="PackedScene" uid="uid://cuad3khwmhnsa" path="res://prefabs/enemy.tscn" id="3_4ykmj"] [ext_resource type="PackedScene" uid="uid://w7hxcvuvud" path="res://prefabs/bsp_level_generator.tscn" id="4_501hd"] [sub_resource type="Environment" id="Environment_2poci"] @@ -72,7 +72,10 @@ _data = { "walk": SubResource("Animation_nw35k") } -[node name="Node3D" type="WorldEnvironment"] +[node name="Node3D" type="Node3D"] +script = ExtResource("1_dbsm0") + +[node name="Node3D" type="WorldEnvironment" parent="."] environment = SubResource("Environment_2poci") [node name="OmniLight3D" type="DirectionalLight3D" parent="."] @@ -108,10 +111,6 @@ libraries = { "": SubResource("AnimationLibrary_7dyvd") } -[node name="Enemy" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_4ykmj")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 0, 20) -collision_layer = 5 -motion_mode = 0 -target = NodePath("../Player") - [node name="BspLevelGenerator" parent="." instance=ExtResource("4_501hd")] + +[connection signal="grid_generated" from="BspLevelGenerator" to="." method="_grid_generated"] -- cgit