summaryrefslogtreecommitdiff
path: root/scripts/Game.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-24 21:46:00 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-24 21:46:00 -0300
commitefb712cb70ca1d0913bb69456ac2344fbaacad0e (patch)
treef59a1ce426ed8ee9373b1577126c55c8017dbc4a /scripts/Game.cs
parent723e66a82606ee78ca4156a0c0a850185b4c0369 (diff)
Gerador de masmorras.
Diffstat (limited to 'scripts/Game.cs')
-rw-r--r--scripts/Game.cs10
1 files changed, 3 insertions, 7 deletions
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");
- Map_Data = Map.Map_Data;
-
inputHandler = GetNode<InputHandler>("InputHandler");
actorsNode = GetNode<Node2D>("Actors");
- player = new Player(Vector2I.Zero, Map_Data, playerDefinition);
+ player = new Player(Vector2I.Zero, null, playerDefinition);
Camera2D camera = GetNode<Camera2D>("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) {