diff options
Diffstat (limited to 'scripts/DungeonLevel.cs')
| -rw-r--r-- | scripts/DungeonLevel.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/DungeonLevel.cs b/scripts/DungeonLevel.cs index cdafdca..68751c5 100644 --- a/scripts/DungeonLevel.cs +++ b/scripts/DungeonLevel.cs @@ -3,12 +3,9 @@ using System; public partial class DungeonLevel : Node2D { - public Player player; private TileMapLayer buildingLayer; - [Export] public Godot.Collections.Array<Actor> Actors { get; private set; } = []; - private Node2D actorsNode; public override void _Ready() @@ -17,7 +14,11 @@ public partial class DungeonLevel : Node2D buildingLayer = GetNode<TileMapLayer>("Dungeon"); actorsNode = GetNode<Node2D>("Actors"); - player = actorsNode.GetNode<Player>("Player"); + } + + public void InsertActor(Actor actor) { + Actors.Add(actor); + actorsNode.AddChild(actor); } public bool IsTileWalkable(Vector2I pos) { |
