diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-10-26 20:02:15 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-10-26 20:02:15 -0300 |
| commit | f4ed469fc9eaeebf39093fbf6601581cc10c6e2f (patch) | |
| tree | d8f29ae3288e950b5fb1f5251845d57949ca2ac0 /scripts/Map/Map.cs | |
| parent | 639cd8cef403e9e66bf31e7888e786effac2b292 (diff) | |
feat:save AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
O vazio dentro de mim é como uma xícara de café esquecida
no canto da mesa.
Diffstat (limited to 'scripts/Map/Map.cs')
| -rw-r--r-- | scripts/Map/Map.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/Map/Map.cs b/scripts/Map/Map.cs index 8521797..04ccabd 100644 --- a/scripts/Map/Map.cs +++ b/scripts/Map/Map.cs @@ -1,3 +1,4 @@ +using System.Net.Http.Headers; using Godot; using TheLegendOfGustav.Entities; using TheLegendOfGustav.Entities.Actors; @@ -95,4 +96,21 @@ public partial class Map : Node2D { entitiesNode.AddChild(entity); } + + public bool LoadGame(Player player) + { + + MapData = new(0, 0, player); + + if (!MapData.LoadGame()) + { + return false; + } + + PlaceTiles(); + PlaceEntities(); + + MapData.EntityPlaced += OnEntityPlaced; + return true; + } } |
