Skip to content

Commit bba2b13

Browse files
committed
wip: adicionado classes iniciais de jogo que utilizara a classe mapscanner para escanear o mapa atual previamente construido dentro da godot
1 parent 1b592a7 commit bba2b13

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

Modules/Game/Scripts/Game.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using DungeonRoyale.Modules.GameManagers.Scripts;
2+
3+
namespace DungeonRoyale.Modules.Game.Scripts;
4+
5+
public partial class Game : Node2D
6+
{
7+
private static TilesManager _tilesManager => TilesManager.Instance!;
8+
9+
[Export] public int MapWidth { get; private set; }
10+
[Export] public int MapHeight { get; private set; }
11+
12+
private bool MapIsLoading { get; set; } = true;
13+
14+
public override void _Ready()
15+
{
16+
_tilesManager.SetUpTiles(MapWidth, MapHeight);
17+
}
18+
19+
public void OnMapScanned()
20+
{
21+
MapIsLoading = false;
22+
23+
// Do something with the scanned map
24+
}
25+
26+
public void OnMapGenerated()
27+
{
28+
MapIsLoading = false;
29+
30+
// Do something with the generated map
31+
}
32+
}

Modules/Game/Scripts/Game.cs.uid

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://doeo50prutum0

Modules/Map/MapScanner.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace DungeonRoyale.Modules.Map;
2+
3+
public partial class MapScanner : Node2D
4+
{
5+
public void Scan()
6+
{
7+
// Scan the map
8+
}
9+
}

Modules/Map/MapScanner.cs.uid

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://di6j7dxqlb03e

0 commit comments

Comments
 (0)