diff options
Diffstat (limited to 'scripts/map/DungeonGenerator.cs')
| -rw-r--r-- | scripts/map/DungeonGenerator.cs | 7 |
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); } |
