summaryrefslogtreecommitdiff
path: root/scripts/map/DungeonGenerator.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-26 22:59:57 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-26 22:59:57 -0300
commit6c7e2ac133986efa57b43df52a5498c6f7efcf75 (patch)
tree8404bfd3415a8dfcf7073191cbfdf58cc7c905ed /scripts/map/DungeonGenerator.cs
parenta3103718796a472da76838bf6fd72ba5d8409d79 (diff)
AI
Diffstat (limited to 'scripts/map/DungeonGenerator.cs')
-rw-r--r--scripts/map/DungeonGenerator.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/map/DungeonGenerator.cs b/scripts/map/DungeonGenerator.cs
index 9a2ceae..ebb7a3d 100644
--- a/scripts/map/DungeonGenerator.cs
+++ b/scripts/map/DungeonGenerator.cs
@@ -2,8 +2,8 @@ using Godot;
public partial class DungeonGenerator : Node
{
- private static readonly Godot.Collections.Array<ActorDefinition> enemies = [
- GD.Load<ActorDefinition>("res://assets/definitions/actor/Skeleton.tres")
+ private static readonly Godot.Collections.Array<EnemyDefinition> enemies = [
+ GD.Load<EnemyDefinition>("res://assets/definitions/actor/Skeleton.tres")
];
[ExportCategory("Dimension")]
@@ -87,6 +87,7 @@ public partial class DungeonGenerator : Node
PlaceEntities(data, room);
}
+ data.SetupPathfinding();
return data;
}
@@ -108,7 +109,7 @@ public partial class DungeonGenerator : Node
}
if (canPlace) {
- ActorDefinition definition = enemies.PickRandom();
+ EnemyDefinition definition = enemies.PickRandom();
Enemy enemy = new Enemy(position, data, definition);
data.InsertActor(enemy);
}