From efb712cb70ca1d0913bb69456ac2344fbaacad0e Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 24 Aug 2025 21:46:00 -0300 Subject: Gerador de masmorras. --- scripts/Game.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scripts/Game.cs') diff --git a/scripts/Game.cs b/scripts/Game.cs index 836af84..06ef018 100644 --- a/scripts/Game.cs +++ b/scripts/Game.cs @@ -14,12 +14,10 @@ public partial class Game : Node { Map Map = GetNode("Map"); - Map_Data = Map.Map_Data; - inputHandler = GetNode("InputHandler"); actorsNode = GetNode("Actors"); - player = new Player(Vector2I.Zero, Map_Data, playerDefinition); + player = new Player(Vector2I.Zero, null, playerDefinition); Camera2D camera = GetNode("Camera2D"); RemoveChild(camera); @@ -27,11 +25,9 @@ public partial class Game : Node { actorsNode.AddChild(player); - Enemy Skeleton = new Enemy(Vector2I.Zero, Map_Data, skeletonDefinition); - actorsNode.AddChild(Skeleton); + Map.Generate(player); - Map_Data.InsertActor(new Vector2I(1, 1), player); - Map_Data.InsertActor(new Vector2I(3, 4), Skeleton); + Map_Data = Map.Map_Data; } public override void _PhysicsProcess(double delta) { -- cgit v1.2.3